hi,
i executed the following code from two diff browsers ,its working fine.
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class test extends HttpServlet
{
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
res.setContentType("text/html");
ServletOutputStream out = res.getOutputStream();
try {
} catch (Exception e) {}
out.println("<html><head><title>Testing</title></head><body>");
out.println("<center>");
out.println("<h2>Your data has been accepted</h2>");
out.println("</center>");
out.println("</body></html>");
out.close();
}
bye
Hari
At 11:08 AM 12/1/99 +0530, you wrote:
>Hi,
>I have a problem in getting response from the servlet when I call the
>servlet simultaneously from different browsers/browser windows. The problem
>is if I call the servlet from two browsers, one shows the response page
>where as the second one show me an error 'document contains no data', can
>anyone please let me know why am getting this error?
>
>I am adding a piece of code here.
>
> public void doPost(HttpServletRequest req, HttpServletResponse res)
> throws ServletException, IOException
> {
>
> res.setContentType("text/html");
> out=res.getOutputStream();
>
> try {
> <codes for database manipulation>
> } catch (Exception e) {}
>
> out.println("<html><head><title>Testing</title></head><body>");
> out.println("<center>");
> out.println("<h2>Your data has been accepted</h2>");
> out.println("</center>");
> out.println("</body></html>");
> out.close();
> }
>
>Thanks in advance.
>
>Kumaravadivelu
>
>___________________________________________________________________________
>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