• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

View is Not Rendering on Request to SimpleFormController

 
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there

I am following this article
http://docs.spring.io/docs/Spring-MVC-step-by-step/part4.html#step4.4


All the Steps that are mentioned previously from 4.5 are working fine but in this case as this mentioned that there is a Link on hello.jsp that will redirect follow to /priceincrease.htm.I am getting error there that View that i Configure
priceincrease.jsp is not showing.

This is my /priceincrease.htm configuration in spring.xml file


this is my PriceIncreaseFormController class



this is my priceincrease.jsp file


and this is my hello.jsp file from where I am getting request in /priceincrease.htm class



although I am getting request in PriceIncreaseFormController class
on method


protected Object formBackingObject(HttpServletRequest request) throws ServletException {
PriceIncrease priceIncrease = new PriceIncrease();
priceIncrease.setPercentage(20);
return priceIncrease;
}




because on log it is printing


Oct 05, 2014 8:38:16 AM springapp.web.InventoryController handleRequest
INFO: Returning hello view with Sun Oct 05 08:38:16 IST 2014
Oct 05, 2014 8:38:18 AM springapp.service.PriceIncrease setPercentage
INFO: Percentage set to 20




but view priceincrease.jsp is not rendering I have added jar on both side on Build Path and Deployment Assembly

this is my directory structure
dircectory.PNG
[Thumbnail for dircectory.PNG]
 
Ranch Hand
Posts: 672
4
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First, from your previous threads, what i understand is you are starting/learning spring now, so, why start with the older version of spring, SimpleFormController were used till spring 2.5 version, and was deprecated from spring 3.0 version in favor of Annotated controllers, your controller should not extend any class. Start with the newer version of spring and learn the better way to do things.

Next, regarding the problem, you have the successview mapped to hello.htm, where it is mapped in the xml file? i don't see this..
can you post your full xml file?

 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes this is my full xml file


any thing else?
 
Prasad Krishnegowda
Ranch Hand
Posts: 672
4
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you get when you try to invoke /priceincrease.htm in the browser? Any error or blank page?

Can you post the log excerpts when you try to invoke the same.
 
reply
    Bookmark Topic Watch Topic
  • New Topic