With that ViewResolver Spring is going to prefix /WEB-INF/jsp" and postfix . Jsp to every view, and since you return a string it assumes you are returning a view name.
With that ViewResolver Spring is going to prefix /WEB-INF/jsp" and postfix . Jsp to every view, and since you return a string it assumes you are returning a view name. You need to get rid of that InternalResourveViewResolver and use the mvc-annotation-driven tag in your servlet-xml file.
Update: Since you want RESTful you shouldn't be return any jsps at all so get rid of that. Add "" to your servlet-xml file, remove the JstlView bean and any other view beans you have defined. And add the @ResponseBody annotation to your controller.
Change the URL pattern to just '/'. Web. Xml: addictedWebServices org.springframework.web.servlet.
DispatcherServlet 1 addictedWebServices / addictedWebServices-servlet. Xml The only downside is that you need to add mappings for any resources you want the container to process without Spring's intervention, for example: default *.css.
If "OK" is actual result you want, then you have to add @ResponseBody annotation to this method.
Sorry this is not what I'm looking for.. I want "OK" to resolve to "WEB-INF/jsp/OK. Jsp" and that is what is happening.. but the Spring DispatcherServlet is catching the request because the servlet-mapping url-pattern is set to "/*" – Diego Jun 22 '10 at 18:07 Then that isn't a RESTful Web Service. To be RESTful in this basic way your POST request should return a 201 (Created) response code by using @ResponseStatus(HttpMethod.
CREATED). – Robby Pond Jun 22 '10 at 18:12 Thanks, I'd still like to know how to have RESTful URLs but also to be able to resolve to . Jps's, .
Ftl's, etc. I have asked a similar question here: stackoverflow. Com/questions/3212746/… – Diego Jul 9 '10 at 12:59.
Thanks for you reply. If I understand you correctly, I may have already tried this.. I commented out the InternalResourveViewResolver and I put the following in addictedWebServices-servlet. Xml: I get the very same Warning and a 404 from Tomcat.
The Spring DispatcherServlet still seems to handle that URL.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.