View resolvers include context in path
I'm trying to develop a simple MVC app to understand how everything is put together.
I've a problem in the line of this thread:
The fact being that depending on url-pattern I use in web.xml while the correct method of the controller is called correctly, the view that is looked for changes, addind in some cases the context path to it.
For example, with this patterns:
Everything works fine, and (for example) to a certain request the jsp view used is "/WEB-INF/jsp/test.jsp".
While if I use:
The view that Spring tries to use becomes: "/mywebapp/WEB-INF/jsp/test.jsp" that of course is wrong.
On the before mentioned thread you can see the error (mine is completely the same):
Any hint on why this strange behavior?
09:52:26 WARN org.springframework.web.servlet.PageNotFound[noHandlerFound] - No mapping for [/myspringmvc/WEB-INF/view/index.jsp] in DispatcherServlet with name 'webapp'
I know that as a workaround I can map / to the dispatcher, but I really would like to understand the issue, it seems like a bug to me.