JSP variables question
April 9, 2004 6:35 AM
Subscribe
I have a JSP Question. How can you pass form variables to another JSP page without using cookies or sessions? I'm doing my form validation on one JSP page and then I need to do the processing of the form in the other. I'm guessing I could set some type of variables like php's $_POST but I'm not sure what to do.
posted by Stynxno to computers & internet (8 comments total)
Request.Form("field_name") or
Request("field_name") or finally
Request.QueryString("field_name")
This method returns the value of the form field passed as a querystring using the "POST" method in the form.
That would give you the value of the form field which you can attach to a variable or just use on its own.
I've worked with JSP some, but I can't remember specifically the syntax for this. At any rate, I know for certain you don't need sessions or cookies to do this.
posted by annathea at 6:45 AM on April 9, 2004