Meaningless Drivel is fun!*
The moose likes Struts and the fly likes saving session variable in drop down list Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "saving session variable in drop down list" Watch "saving session variable in drop down list" New topic
Author

saving session variable in drop down list

divya kundapur
Ranch Hand

Joined: Aug 21, 2007
Posts: 110

i have 2 session variables which has user selected values from 2 drop down lists. When the page reloads i want these 2 session variables to be displayed in the drop down lists. How can i use those session variables as values since the drop down lists gets data from a action class.


SCJP - 5.0
Bilal A. Siddiqui
Ranch Hand

Joined: Sep 14, 2008
Posts: 53

Add these session variables in your drop down list in action class itself.


Cheers!!! Bilal
Handsome Android||@bilal_speed||LinkedIn
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

divya kundapur wrote:
i have 2 session variables which has user selected values from 2 drop down lists. When the page reloads i want these 2 session variables to be displayed in the drop down lists. How can i use those session variables as values since the drop down lists gets data from a action class.

Do you want to say, like " User selects two values from DD lists, and when they select those values, its get inserted into session ?"


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
divya kundapur
Ranch Hand

Joined: Aug 21, 2007
Posts: 110
Sagar Rohankar wrote:
divya kundapur wrote:
i have 2 session variables which has user selected values from 2 drop down lists. When the page reloads i want these 2 session variables to be displayed in the drop down lists. How can i use those session variables as values since the drop down lists gets data from a action class.

Do you want to say, like " User selects two values from DD lists, and when they select those values, its get inserted into session ?"


I solved this issue, just had to use struts tags instead of plain html.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: saving session variable in drop down list
 
Similar Threads
Displaying value second drop down based on the value selected in the first drop down
Session values of a Backing Bean in JSF
Reg : Drop-down box
How to retain the selected values of a dropdown in the result page using JSP and servlet
saving preselected drop down value