Hi,

Since my application is redirecting to a third party site, I would like
to display a user-friendly page if there is any problem in that site,
like site is down, connection timeout or even unknown host etc.  But I
am unable to catch these types of error, I am using following code:
try {
    response.sendRedirect("www.xyz.com");
} catch (Exception e) {
    System.out.println("Some error occurred....");
}

Is there any way to check before redirecting whether site is up,
existing etc.  Any help will be highly appreciated.

Thanks in advance.

Sushil

___________________________________________________________________________
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