Hi,
i'm getting error if i try to call "http://localhost:8080/myapp/myprofile/msgs". I can see the page but the style and images are not available :/
Error is:
I guess it happens cause of wrong resource mapping configuration. But i have no idea how i can solve the problem.WARN : PageNotFound - No mapping found for HTTP request with URI [/myapp/myprofile/resources/js/jquery/jquery-1.7.1.js] in DispatcherServlet with name 'appServlet'
WARN : PageNotFound - No mapping found for HTTP request with URI [/myapp/myprofile/resources/js/jquery/ui/jquery.ui.core.js] in DispatcherServlet with name 'appServlet'
WARN : PageNotFound - No mapping found for HTTP request with URI [/myapp/myprofile/resources/js/jquery/ui/jquery.ui.slider.js] in DispatcherServlet with name 'appServlet'
WARN : PageNotFound - No mapping found for HTTP request with URI [/myapp/myprofile/resources/js/jquery/ui/jquery.ui.button.js] in DispatcherServlet with name 'appServlet'
WARN : PageNotFound - No mapping found for HTTP request with URI [/myapp/myprofile/resources/js/jquery/ui/jquery.effects.core.js] in DispatcherServlet with name 'appServlet'
WARN : PageNotFound - No mapping found for HTTP request with URI [/myapp/myprofile/resources/js/jquery/ui/jquery.ui.widget.js] in DispatcherServlet with name 'appServlet'
...
an so on... css, images not found...
web.xml
Code:<servlet> <servlet-name>appServlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>appServlet</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
servlet-context.xml
My controller classCode:... <resources mapping="/resources/**" location="${webappRoot}/resources/" /> ...
Thanks in advance for the help!Code:@Controller @RequestMapping(value = "/myprofile") public class ProfileController { private static final Logger _logger = MyLoggerFactory.getLogger(ProfileController.class); @RequestMapping(method = RequestMethod.GET, value="/msgs") public String openMsgs(HttpServletRequest request) { // return ProfilePage.MESSAGES.file; } }


Reply With Quote