Hi,
try with HttpServletResponse.SC_NOT_MODIFIED
Cezar
On Mon, 17 May 1999, Aurelio wrote:
> Ok, I could do this, but I prefer not because the user sees "something
> strange" is happening.
> The SC_NO_CONTENT option seems to be more elegant, although... An
> elegant thing
> that doesn't work is not very useful :-)
>
> Andras Balogh wrote:
>
> > HI !
> >
> > Why not abord this problem from a different point of view.
> > -Why not send a blank page
> > -or res.sendRedirect("http://a pge somewhere");
> > -or send a page cotaining:
> > ..
> > <body onLoad="history.back()">
> > ...
> >
> > and probably more options are available.
> >
> > Best wishes,
> > Andras
> >
> > -----Original Message-----
> > From: Aurelio <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> > Date: Monday, May 17, 1999 2:28 PM
> > Subject: Re [2]: I don't want to send a page to the browser.
> >
> > >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
> >
> > ___________________________________________________________________________
> > 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