Hi Gautam,

Problem is still there after adding flush & close. This error is also coming
in MS Explorer. Can u please give me another suggestion.

Thanks,
Pankaj

-----Original Message-----
From: Gautam Batra [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 01, 2000 4:51 PM
To: [EMAIL PROTECTED]
Subject: Re: Post Method in JSDK2.1




Hi,

Try adding the following code in the servlet after out.println("test");

out.flush();
out.close();

This error happens in Netscape browsers if you do not specify these lines.

public void doPost(HttpServletRequest req,HttpServletResponse res)
           throws ServletException,IOException {

     res.setContentType("text/plain");
     PrintWriter out = res.getWriter();

     out.println("This is for Demo Purposes.....");
        out.flush();
       out.close();
   }

Gautam Batra
----------
----- Original Message -----
From: pankaj <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 01, 2000 3:50 PM
Subject: Post Method in JSDK2.1


> Hi guys,
>
> I am using Post Method using following form. When i execute this form
thru
> Netscape,then Error 'A Network error occured while netscape was receiving
> data.
> (Network Error :Connection reset by peer) Try connecting again' comes. I
am
> using
> jsdk2.1. Can anybody tell me the reason? Get Methods are working fine.
>
> <FORM METHOD=POST ACTION=/servlet/Test >
> Employee No <INPUT TYPE=text NAME=id ><BR>
> <INPUT TYPE=SUBMIT>
> </FORM>
>
> Sevlet code is as follows :
>
> public class Test extends HttpServlet {
>
> public void doPost(HttpServletRequest req,HttpServletResponse res)
>            throws ServletException,IOException {
>
>     res.setContentType("text/plain");
>     PrintWriter out = res.getWriter();
>
>     out.println("This is for Demo Purposes.....");
>   }
> }
>
>
___________________________________________________________________________
> 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

Reply via email to