I have used SC_NO_CONTENT  and doesn't work. This is my code:

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

    res.setStatus(HttpServletResponse.SC_NO_CONTENT);
 ....
}

The servlet finishes its task rigth, but I still receive "Document contains no
data" in the browser. Why?



Hector Fabio Meza wrote:

> At 07:29 PM 12/05/99 +0200, you wrote:
>
> Try using a
>
> HttpServletResponse.setStatus(HttpServletResponse.SC_NO_CONTENT)
>
> to instruct the browser that you're not sending a response back
>
> >Hi,
> >how can I avoid the "Document contains no data" message in the browser
> >if I call a servlet that performs some task but doesn't need to send a
> >page to the client?
> >
> >Bye.
> >
> >___________________________________________________________________________
> >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