• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

View is Not Rendering on Request to SimpleFormController

 
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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.
 
Oh the stink of it! Smell my tiny ad!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!