hi hugo,
you can find the source code at this link
http://www.servlets.com/jservlet2/examples/index.html
If you want to use "?" while doing post request, set the content-type
explicitly. i am giving the extract of mail about similar problem.
> The servlet container is trying to read your POST'ed object
> as a form. That should only happen if your content-type is
> "application/x-www-form-urlencoded", which is (always?) the
> default if you don't set it to anything else.
check out archives for more details.
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: Hugo Malheiro <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 26, 2001 4:14 PM
Subject: Re: getParameter()
> Hi Sourabh.
>
> Where can find that example to? is there a web site?
>
> Thanks
>
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> Sourabh Kulkarni
> Sent: quarta-feira, 26 de Setembro de 2001 8:37
> To: [EMAIL PROTECTED]
> Subject: Re: getParameter()
>
>
> 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
>
>
___________________________________________________________________________
> 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