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 Struts and the fly likes <s:select list> How to get values from database? 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 » Struts
Bookmark "<s:select list> How to get values from database?" Watch "<s:select list> How to get values from database?" New topic
Author

<s:select list> How to get values from database?

suraj savaratkar
Ranch Hand

Joined: May 17, 2010
Posts: 67
I want to put a session values into first <s:select> tag and according to selected item, second <s:select list> should display a corrsponding values from database.

For. e. g : if first select displays Java as template then second list must display values corresponds to Java template like core java,j2EE, J2ME from the database.

Please give the syntax.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

There is no syntax, you have to build a component like that yourself, or use the doubleselect tag.
suraj savaratkar
Ranch Hand

Joined: May 17, 2010
Posts: 67
hi,
if you should know the syntax for <s:doubleselect> please forward for above question .
 
Consider Paul's rocket mass heater.
 
subject: <s:select list> How to get values from database?
 
Similar Threads
populate items using struts2 <s:select>
Action within JSP
Populating a dependant select list without reloading the page
Populating a dependant select list without reloading the page
Struts 2 s:select has no value