Mohammed,
I believe that the URLConnection class uses accesses to the
input and output streams to determine whether to do a GET
or a POST. Input without output results in a GET, output
then input results in a POST. No input or output results in
nothing. Try getting some input from the connection to
force a GET.
Regards,
Rob Griffin
Quest Software
E-mail: [EMAIL PROTECTED]
Web site: http://www.quest.com
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> Mohammed Akacem
> Sent: Friday, 10 November 2000 3:42
> To: [EMAIL PROTECTED]
> Subject: applet servlet
>
>
> Hello,
>
> in my applet I am connecting with my servlet as follow:
>
> // code
> I am only sending a cookie und the servlet should delete all the file
> related to this cookie. but the servlet is not doing any thing
>
> con=Connect();
>
> if(con!=null)
> {
> System.out.println("con is not null");
> // con.setDoInput(true);
> // con.setDoOutput(true);
> con.setUseCaches(false);
> con.setRequestProperty("Cookie",cookie);//I am only
> sending a cookie
>
> con.disconnect();
> con=null;
> System.out.println("I disconnected");
> }
> else System.out.println(" con is null");
>
> im my servlet
>
> //code
> parameter=req.getParameter("command");
>
> if (parameter=="delete")
> {
> String filetodelete= "/tmp/" + cooks[0].getValue()+ ".stl";
> File f = new File(filetodelete);
> try
> {
> if (f.delete())System.out.println("I delete the
> following file :"+ filetodelete);
> else System.out.println(" I couldn't delete the
> following file :" + filetodelete);
> }
> catch (SecurityException ex)
> {
> System.out.println(" can not delete because of this
> exception :" + ex);
> }
> }
>
> thanks for any hint
>
> Mohammed
>
> __________________________________________________________________
> _________
> 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