aspose file tools*
The moose likes Spring and the fly likes View resolver is not able to identify the correct view Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "View resolver is not able to identify the correct view" Watch "View resolver is not able to identify the correct view" New topic
Author

View resolver is not able to identify the correct view

samir ware
Ranch Hand

Joined: Jul 27, 2005
Posts: 192
Hello all
My entry for view resolver in config file is as follows.



And my request URL is as follows



My request gets mapped to the correct controller. Though from controller I am not able to locate the accurate view.
My handleRequest code from controller is as follows




Though after controller gets invoked I am getting following error .



where as the expected URL is




Am I missing something here ? Why my view provided in the controller is not getting picked up ?
Any white paper / link will greatly be appreciated.
Thanks in advance
Samir
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Why do you have

<property name="viewClass" value="org.springframework.web.servlet.view.JstlVi ew"/>

in your internalResourceViewResolver?

Also why do you need…

@RequestMapping(method = { RequestMethod.GET, RequestMethod.POST })?

On your method. For all web browsers they submit either GETs or POSTs anyway, so it is redundant.

Finally, it looks like you are using the older Spring 2.0 and before Controller interfaces rather than the more up to date approach of making your Controller's POJOs and not implementing a Spring interface or extending a Spring class.

Is this code that was already there??? It looks more like you are learning Spring now, and using dated materials to learn.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
Consider Paul's rocket mass heater.
 
subject: View resolver is not able to identify the correct view