This question already has an answer here:
My handler forwards to internalresourceview 'apiForm' but then i get error 404 RequestURI=/WEB-INF/pages/apiForm.jsp. I'm sure apiForm.jsp located in /WEB-INF/pages/
13:45:02,034 DEBUG [org.springframework.web.servlet.view.JstlView] - Forwarding to resource [/WEB-INF/pages/apiForm.jsp] in InternalResourceView 'apiForm'
13:45:02,035 DEBUG [org.springframework.web.servlet.DispatcherServlet] - DispatcherServlet with name 'testapp2' determining Last-Modified value for [/WEB-INF/pages/apiForm.jsp]
13:45:02,038 DEBUG [org.springframework.web.servlet.DispatcherServlet] - No handler found in getLastModified
13:45:02,038 DEBUG [org.springframework.web.servlet.DispatcherServlet] - DispatcherServlet with name 'testapp2' processing request for [/WEB-INF/pages/apiForm.jsp]
13:45:02,038 WARN [org.springframework.web.servlet.PageNotFound] - No mapping found for HTTP request with URI [/WEB-INF/pages/apiForm.jsp] in DispatcherServlet with name 'testapp2'
13:45:02,045 DEBUG [org.springframework.web.servlet.DispatcherServlet] - Successfully completed request
13:45:02,048 DEBUG [org.springframework.web.servlet.DispatcherServlet] - Successfully completed request
this is how my dispatcher.xml look like..
<bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
<property name="prefix" value="/WEB-INF/pages/"/>
<property name="suffix" value=".jsp"/>
</bean>
I had the same problem, Of course there was a little difference. The story was that when I was removing the below line:
Everything was OK but in presence of that line the same error raise.
After some trial and error I found I have to add the below line to my spring application context file:
Hope it helps!
I think I read the entire internet to figure out how to get sitemesh to handle my html paths without extension + API paths without extension. I was wrapped up in a straight jacket figuring this out, every turn seemed to break something else. Then I finally came upon this post.
Enter this in your dispatcher-servlet.xml
I have encountered this problem in Eclipse Luna EE. My solution was simply restart eclipse and it magically started loading servlet properly.
change the your servlet name dispatcher to any other name .because dispatcher is predefined name for spring3,spring4 versions.
This could also happen when you're app doesn't actually compile, yet it's still launched in Tomcat. When I saw this happen, it wasn't compiling because the project had a "project specific" JDK specified, and the code was checked out on a machine that didn't have that specific JDK. Eclipse defaulted to a JRE instead, not a JDK, and then the app wasn't compiled.
To fix it in our specific case, we just turned off "Project Specific Settings" here:
"Project | Properties | Java Compiler"
Here's more detailed info on how to do this: https://stackoverflow.com/a/2540730/26510
Looks like DispatcherServlet is trying to process the request for apiForm.jsp, which suggests to me that your web.xml servlet-mapping is directing requests for that space to DispatcherServlet.
You might have something like this?
Try calling your controllers with a different extension (.do for example) and update the servlet-mapping to suit