how web server stores the form data?

M

Matt

When we click the submit button as the following form, my
understanding is it will submit the form to the web server,
and then open page2.jsp. My question is web server has
some area to store the name-value pairs?? I just want to understand
how it works internally.

<FORM ACTION="page2.jsp" METHOD="POST">
<INPUT TYPE="hidden" name="username" value="joe">
<INPUT TYPE="submit" value="submit form">
</FORM>

In page2.jsp
<%= request.getParameter("username") %>


Please advise. Thanks!!
 
M

Mark Parnell

When we click the submit button as the following form, my
understanding is it will submit the form to the web server,

So you said the other day. Didn't you like the answers you got then?

You seem to have a habit of continually asking the same questions.
Methinks I smell a troll, albeit an unusual one.
 
W

WebcastMaker

So you said the other day. Didn't you like the answers you got then?
You seem to have a habit of continually asking the same questions.
Methinks I smell a troll, albeit an unusual one.

Maybe he has one of those forma of amnesia where he forgets what he did
the day before....
 
M

Mark Parnell

Maybe he has one of those forma of amnesia where he forgets what he did
the day before....

LOL. Maybe. Though it is in the archives, so it wouldn't be hard to
check. :)
 
T

Toby Inkster

WebcastMaker said:
Maybe he has one of those forma of amnesia where he forgets what he did
the day before....

Well, then I forgive him -- but only if he's as hot as Drew Barrymore.
 
R

RobM

Matt said:
When we click the submit button as the following form, my
understanding is it will submit the form to the web server,
and then open page2.jsp. My question is web server has
some area to store the name-value pairs?? I just want to understand
how it works internally.

<FORM ACTION="page2.jsp" METHOD="POST">
<INPUT TYPE="hidden" name="username" value="joe">
<INPUT TYPE="submit" value="submit form">
</FORM>

In page2.jsp
<%= request.getParameter("username") %>


Please advise. Thanks!!

Well... you've answered your own question with the example above. If you're
using JSP, then yes the name/value pairs submitted from a form (or encoded
on a URL GET) will be stored on the server (i.e. in the JSP container e.g.
Tomcat) in an object "request". Look at the JSP/Java API "ServletRequest" at
http://java.sun.com/j2ee/1.4/docs/api/index.html . "Stored" though for the
brief time the page is being served.

Cheers
Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top