Try putting your form together like this:
<form method=post action=/servlet/readrequest>
<input type=hidden name=id value=20>
<input type=text name=code>
<input type=submit>
</form>
and modifying your servlet to parse the id within the doPost method.
Not sure if this is what you wanted...
Will K.
-----Original Message-----
From: Mario Libraro <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Friday, May 14, 1999 6:27 AM
Subject: servlet doPost & doGet methods
|Hi to all,
|
|i'm using a simple servlet application: there is a servlet called
|CreatePage who creates a form on the browser, and a servlet called
|ReadRequest.
|I send some data with POST (name) and some other with GET (id)
|
| <form method=post action=readrequest?id=20>
| <input type=text name=code>
| <input type=submit>
| </form>
|
|in my servlet readrequest i have both doPost and doGet methods... but
|only doPost starts after data was sent from browser...
|now i can read only the post data with getParameterValues()... In order
|to read the GET data i must call getQueryString... who contains the
|entire query string (ID=20).
|
|
|Can I use the method getParameterValues even for the GET data, if there
|is both POST and GET??
|--
|
| ________________________________________________
| ________| |________
| \ | Mario Libraro Tiresia S.r.l. | /
| \ | Project Manager http://www.tiresia.it | /
| / |_______________________________________________| \
| /___________) (__________\
|
|___________________________________________________________________________
|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
|
___________________________________________________________________________
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