Hi,
GET=max size String is 254
POST=String is unlimited.
------------------------
From: Vivin Kumar P <[EMAIL PROTECTED]>
Subject: GET POST Difference
Date: Fri, 22 Sep 2000 13:46:13 +0530
To: [EMAIL PROTECTED]
Hi Gurus,
I have a sort of basic doubt in the GET and POST METHODS.
Well I have a HTML like this and Iam calling a servlet with the FORM data.
<HTML><TITLE>Form Test</TITLE>
<BODY>
<FORM NAME="frmTest" METHOD="GET" ACTION
="http://vivin/servlets/TestServlet">
<INPUT TYPE=TEXT NAME="txtVal" VALUE="Hello World" LENGTH=20>
<INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>
When we use METHOD="GET" the values are passed as query string like,
"http://vivin/servlets/TestServlet?txtVal=Hello+World"
So I know how the values are passed to the server. The header request from
the
browser to the server will be like this:
GET /servlets/TestServlet?txtVal=Hello+World HTTP/1.1
Accept: application/vnd.ms-excel, application/msword,
application/vnd.ms-powerpoint, image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)
Host: vivin
Connection: Keep-Alive
But when we use METHOD="POST" the URL is just,
"http://vivin/servlets/TestServlet"
and the request to the server is something like this,
POST /servlets/TestServlet HTTP/1.1
Accept: application/vnd.ms-excel, application/msword,
application/vnd.ms-powerpoint, image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, */*
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)
Host: vivin
Content-Length: 18
Connection: Keep-Alive
Now where is the values being passed to the server?
Are the values passed back to the server at all in a POST method?
Any help is appreciated.
Thanks in advance,
Vivin.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
---------------End of Original Message-----------------
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html