Jul 25th, 2010, 01:42 PM
Issues starting out with Spring Surf
I'm attempting to make my way through the Spring Surf tutorial at http://www.springsurf.org/sites/1.0....tml/intro.html.
The Roo steps go well but when I attempt to start the Surf example 'mvn clean package jetty:run' I get an exception in the output:
Error on line 1 of document http://tuckey.org/res/dtds/urlrewrite3.0.dtd
A quick search on Google finds that the urlrewrite.xml file needs to switched from 3.0 to 3.2. I make the change and try again 'mvn clean package jetty:run'.
All starts well and I open the home page at http://localhost:8180/. I get the page displayed but no resources are displayed. All image links are broken. When I attempt to open an image in a separate tab, e.g., http://localhost:8180/res/images/cmis32.jpg, I get this error message:
HTTP ERROR 500
Problem accessing /res/images/cmis32.jpg. Reason:
Could not resolve view with name 'service/resource/images/cmis32' in servlet with name 'Spring MVC Dispatcher Servlet'
javax.servlet.ServletException: Could not resolve view with name 'service/resource/images/cmis32' in servlet with name 'Spring MVC Dispatcher Servlet'
at org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:1042)
at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:798)
at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:716)
at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:647)
at org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:552)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:707)
I don't believe I've messed up the tutorial - there are very few steps - so I'm assuming there's something broken with the milestone. How can I fix it?
Thanks in advance
Aug 18th, 2010, 06:35 AM
Can you give me details how you installed Surf/Roo addon etc?
It doesn't seem like we need to adjust urlrewrite.xml.
Can you post the generated pom.xml as well?
Also which version of STS and Roo are you using?
Aug 18th, 2010, 09:22 AM
It was my settings.xml. I'm referencing a newer version of urlrewrite. My assumption is that's what was preventing the images from working as well.
Aug 18th, 2010, 10:52 AM
I am using the old version and have no issue with the images.
which version of STS are you using? or you just use native roo?