This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

saving session variable in drop down list

 
divya kundapur
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
Bilal A. Siddiqui
Ranch Hand
Posts: 53
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add these session variables in your drop down list in action class itself.
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?"
 
divya kundapur
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic