Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSP and JavaScript! How to put session values into html form?

843836Sep 29 2003 — edited Sep 30 2003
I 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 28 2003
Added on Sep 29 2003
3 comments
198 views