• 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 ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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,
form.submit();
window.close();
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.
 
What I don't understand is how they changed the earth's orbit to fit the metric calendar. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic