Announcement Announcement Module
Collapse
No announcement yet.
Can't map to index.jsp page. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can't map to index.jsp page.

    Hi with spring mvc 3.1, I tried to map to a WEB-INF/index.jsp file, but it failed with the following error:

    HTTP Status 500 -

    type Exception report

    message

    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    javax.servlet.ServletException: Could not resolve view with name 'index' in servlet with name 'Spring MVC Dispatcher Servlet'
    org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:1162)
    org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:950)
    org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:852)
    org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:882)
    org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:778)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:734)
    controller code:
    Code:
    @RequestMapping(value = "/", method = RequestMethod.GET)
        public String home(Model model) {
            logger.debug(" =======HOME PAGE========");
            return "index";
        }
    Any suggestion is very appreciated.
    Thanks
    Sam

  • #2
    It would be useful to see that part of your application context configuration that configures your view resolver. I am shooting in the dark here, but are you by any chance using the InternalResourceViewResolver? If this is the case, check your application context configuration and find out the value of its prefix property. This configures the directory that contains your JSP files. You should move the index.jsp file to that directory.

    Comment

    Working...
    X