----- Original Message -----
From: Andrea Lardicci <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 23, 1999 2:36 PM
Subject: error page


> Hi all,
> That's my problem:
> I would like to open a new small  page  whenever I have to show a
> request/application error, leaving the main page in background.
> How can I achieve the goal?
> Thanks in advance
> AL
>

Hi Al,

hmm, tricky but possible.

Reproduce the page you want to have in the background as it was sent to the
server. In addition add
some javascript into that page that opens a browser window with a unique
name whose source URL is your servlet with a
parameter like ?req=errordetails.

The javascript should be called like this <body [bodybits]
onLoad="jsFNThatOpensErrorWindow();">

Servlet responds by sending the error details IFF (if and only if) there is
a parameter == req with the
value errordetails.

This will only work if you are using a session object (don't forget to
resp.encodeUrl all urls that you send as part of the page
as well otherwise you will have problems with browsers that don't accept
cookies).

Store the error message or an error id in the session object so that it can
be grabbed when serving the error message
to the client.

Hope this helps

Andy Bailey

___________________________________________________________________________
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