Hi,

if you want that your browser retains the current document view,
then you have to set the status code of the servlet response to
204. => setStatus(SC_NO_CONTENT)  (class HttpServletResponse)

I hope it helps.

Andreas

P.S.: Sorry for my bad English.


> Hi,
>
> i have the following requirement. Please see whether u can help me with
> this.
>
> i have a html page with some data. i just
> want one servlet to be executed at the server end. and i dont want the
> servlet to write back anything nor the browser to read back anything.
> The servlet should print out the following info at the server end :
>
> The ip address from which the html page was viewed
> The host name of the machine from which the html page was viewed
> The url which was used to display the html page i.e, the complete path
> of the html page like http://www.abc.com/index.html
>
>
> I have a html page with the code for executing a servlet whenever a html
>
> page is displayed in a browser.
> while the get method of servlet is getting executed, the browser
> displays a message the document contained no data. i dont want to write
> any data back to the browser since the html page containing some data is
>
> already being displayed. i tried closing off the servletoutputstream
> without writing anything. this does not help. on the other hand, if i
> write a line of text what is happening is the data being written is
> displayed in the browser as a new html page. hence the page which was
> earlier being displayed is no more visible.
>
>
> following is the html file  :
> <HTML>
>    <HEAD>
> <META HTTP-EQUIV="refresh" CONTENT = "0;
> URL=http://204.144.145.28:8080/servlet/b">
> <TITLE> The upload  </TITLE> </HEAD>
> <body>
> LIne one
> Line Two
> dkjfdkf
> dfdjf
>
> </body>
> </HTML>
>
> by the way does anybody know the html header for executing post method ?
>
> Thanks in advance.
>
> Regards,
>
>
> Javed
>

___________________________________________________________________________
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