This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Spring and the fly likes retreiving values from database,in spring mvc simple form  controller Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "retreiving values from database,in spring mvc simple form  controller" Watch "retreiving values from database,in spring mvc simple form  controller" New topic
Author

retreiving values from database,in spring mvc simple form controller

indu iyengar
Ranch Hand

Joined: Jul 30, 2010
Posts: 115
Hi

I need to populate the values from database into select box in jsp form.
This Registration Course.jsp will be called as the result of other action, sothat am populating these values at the time of calling only.



but the values are not populating in 'select' box.
I dont know whether this approach is correct or not..
please give me an idea ...


thanks ,
Indu
indu iyengar
Ranch Hand

Joined: Jul 30, 2010
Posts: 115
I tried it by session variable . in jsp, its printing size also.. but elements ...nope
how to write the path variable for <form:select..>
no ideas ?
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 507

You can call a .htm instead of .jsp and give the formview for that htm as Registration Couse.jsp, and use referenceData function in controller to give you the required data to fill the select box..
please avoid use of scriplets in jsp, it's outdated, it was around 10 years back..


Regards, Prasad
SCJP 5 (93%)
indu iyengar
Ranch Hand

Joined: Jul 30, 2010
Posts: 115
Thank you Prasad ...
yes, I got it by googling and by using 'formReferenceData()' function..

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: retreiving values from database,in spring mvc simple form controller
 
Similar Threads
displaying validation errors in jsp
Spring MVC Request Mapping
How can I get a normal input tag's value?
problem while loading the welcome page
Validation error: Failed to convert property value of type [java.lang.String] to required type [int]