File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes Spring MVC - view problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Other Application Frameworks
Reply Bookmark "Spring MVC - view problem" Watch "Spring MVC - view problem" New topic
Author

Spring MVC - view problem

Christophe Verré
Marshal

Joined: Nov 24, 2005
Posts: 14361

I'm new to Spring MVC, and there's something I don't get:

I'm using a simple InternalResourceViewResolver. prefix is "/WEB-INF/jsp/" and suffix is ".jsp"
My Controller returns a ModelAndView whose View name is "home", so the Dispatcher should look for the file "/WEB-INF/jsp/home.jsp"

If the file does not exist, an error occurs. Ok.
But if the file exists, nothing is printed out. The file "home.jsp" only contains a greeting message, but I have a blank page.

It worked with suffix set to ".html"
Would this be a container related problem ? I'm using Tomcat 5.5.

Any clues ?
Thanks.
[ April 25, 2006: Message edited by: Satou kurinosuke ]

[SCBCD Wall of Fame] [My Blog]
All roads lead to JavaRanch
Help Japan. Make a donation.
Christophe Verré
Marshal

Joined: Nov 24, 2005
Posts: 14361

Ok, I've found the problem.
I had jsp-api.jar and servlet-api.jar in my lib directory, probably conflicting with Tomcat's own jars. Removing those intruders solved the problem.
 
 
subject: Spring MVC - view problem
 
Threads others viewed
Error in Context xml file - cvc-complex-type.2.4.c:
Spring and Multiple View Resolvers
a conceptual problem with security in spring
Using JSP&Servlets with Spring
Pre-written servlett and view with spring mvc
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture