hi tarun,
this happens because u r _actually_ making GET request and not POST
request as you think. Don't use "?" while building the URL for opening the
connection. Refer to servlet programming by jason hunter. He has given good
example on that in chapter on applet-servlet communication.
regards,
sourabh
----
Sourabh Kulkarni
Embedded Systems Group.
rapidEffect (P) Ltd.25,Napier Road, Pune 411 001
Tel./Fax. +91-20-6363250
www.rapideffect.com
----- Original Message -----
From: Tarun Matai <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 26, 2001 10:38 AM
Subject: Re: getParameter()
> Hi!
> I faced the same problem my servlet container was the I-Planet webserver,
I
> figured it out that even if I send a post request from the applet to the
> servlet using the url connection class my servlet container handles as a
get
> request !! strange.
> Try adding the following lines in the servlet,
> doGet(req,res)
> {
> doPost(req,res);
> }
>
> here was my post request fro applet,
>
> URL servlet=new URL("http://pupc041/servlet/AuthServ");
> HttpURLConnection con=(HttpURLConnection)servlet.openConnection();
> con.setDoInput(true);
> con.setDoOutput(true);
> con.setUseCaches(false);
>
con.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
> con.setRequestProperty("REQNO","1");
>
>
> -----Original Message-----
> From: Hugo Malheiro [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 26, 2001 3:15 AM
> To: [EMAIL PROTECTED]
> Subject: getParameter()
>
> Hi, i communicating an applet to a servlet. In get request i make
> request.getParameter("name_parameter") and i have no problems with that,
> however in post requests i make the
request.getParameter("name_parameter");
> and i can't get it. It gives me the following error in Java Console
> java.io.FileNotFoundException http://phc:8000/servlet?opcao=something
>
>
___________________________________________________________________________
> 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