java - No mapping found for HTTP request with URI [/myapp/img/logout.png] -
java - No mapping found for HTTP request with URI [/myapp/img/logout.png] -
i writing spring mvc application.
i had asked question should create 2 different servlet entry rest , normal html in web.xml, , got resolved answers given knowledgeable people nowadays on stackoverflow (answer: should create 2 different servlet entry rest , normal html in web.xml)
now web.xml include below code
<servlet> <servlet-name>myapp</servlet-name> <servlet-class>org.springframework.web.servlet.dispatcherservlet</servlet-class> <init-param> <param-name>contextconfiglocation</param-name> <param-value>/web-inf/spring_myapp-servlet.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>myapp</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
but after making changes web.xml mentioned in answer, getting error no mapping found http request uri [/myapp/img/logout.png]
.
i not able load of css, js images
.
i searched issue , got reply http://stackoverflow.com/a/17946825/3898076. if find question duplicate please share solution it.
i not able figure out mistake. can please help me out issue.
note: including files <script type="text/javascript" src="js/jquery.js"></script>
.
thanks.
maybe looking this
<servlet> <servlet-name>default</servlet-name> <servlet-class>org.apache.catalina.servlets.defaultservlet</servlet-class> <init-param> <param-name>debug</param-name> <param-value>0</param-value> </init-param> <init-param> <param-name>listings</param-name> <param-value>true</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/css/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/images/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/js/*</url-pattern> </servlet-mapping>
java spring servlets web.xml
Comments
Post a Comment