• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

retreiving values from database,in spring mvc simple form controller

 
indu iyengar
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ...

 
indu iyengar
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 672
4
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
indu iyengar
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Prasad ...
yes, I got it by googling and by using 'formReferenceData()' function..

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic