• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

How to update Session variable with Form Data ?

Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All ,
I have a JSP page that gets data from database and displays.
One of the Form fields(It is a Drop down box.) on this page has a 'Edit' button . This field is populated with data from a bean which has session scope(jsp:useBean id="..." class="java.util.Vector" scope="session").
When this 'Edit' is pressed , it brings up a popup JSP page (using Javascript window.popup), which has a Table of INPUT fields filled with values from drop down box, and hence allowing user to modify them .
This JSP also has bean with same id as 1st page , hence has access to values of this bean . This Page has a submit button to submit data after modification.
So , on submit ,
1> I need to update the session bean,
How do I do it in JSP ??? . I can only access form field values through Javascript right ??
Right now , I am sending request to a servlet , which is copying form field values to session variable, and then sending request to first JSP page.
2> close the popup window.
I am trying to close widow in Javascript after submit,
It doesn't work.

3> and refresh first window with updated bean contents.

Please help me in this , Any suggession is welcome.
Thanks in advance.
please buy this thing and then I get a fat cut of the action:
a bit of art, as a gift, the permaculture playing cards
    Bookmark Topic Watch Topic
  • New Topic