File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

saving session variable in drop down list

 
divya kundapur
Ranch Hand
Posts: 110
  • 0
  • 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
  • 0
  • 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: 2904
1
Java Spring Ubuntu
  • 0
  • 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
  • 0
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic