JSP and JavaScript! How to put session values into html form?
843836Sep 29 2003 — edited Sep 30 2003I have a master form which goes to detail form to input data and back to master to Confirm submit operation. I want to put all the form data into request or session variable so it can be retrieved in both the forms. In master form i want to use it in the following way:
MasterForm-onLoad(){
check for form data Object in the session/request
if the data exists
populate the form fields (by getter methods of form data object)
Show the input from detail form
otherwise
show empty form
}
Now the problem is that it throws null pointer exception if the form data does not exist and i try to access it within an IF statement.
I beleive this is coz the JSP code will be executed on the server before the html page is loaded. Can any one please tell me how to solve this problem.
Thanks and Best Regards
Gul