hello,
i begin with spring and i try to do that :
controller code :
servlet config :Code:@RequestMapping(value = "/app", method = RequestMethod.GET) public String app(Model model) { return "myapp"; }
in my web-inf/app directory i have a file myapp.html.HTML Code:beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <beans:property name="prefix" value="/WEB-INF/app/" /> <beans:property name="suffix" value=".html" /> </beans:bean>
when i launch the app : i got this message :
http : 404
WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/firstmvc/WEB-INF/app/app.html] in DispatcherServlet with name 'appServlet'
in fact i search the best method to send static display after a get on a entry point (htpp://localhost/firstmvc/app in this case).
i don't want to do a redirect because i want to hide the organization of file to end user.
An other little question if i change the suffix to jsp and i rename myapp.html to myapp.jsp it works, somebody can explain me why ? there is a mapping between the suffix and class type view ?
thanks in advance


Reply With Quote