RE: Setting error page for servlets

2003-08-15 Thread Shapira, Yoav

Howdy,
Seeing how a JSP is a servlet, I'd be very surprised if there was
something you could do with JSPs and not with a servlet ;)

Use the error-page directive in web.xml ;)  The Servlet Spec section
on the deployment descriptor has details and examples.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: James Michelich [mailto:[EMAIL PROTECTED]
Sent: Friday, August 15, 2003 1:00 PM
To: [EMAIL PROTECTED]
Subject: Setting error page for servlets

Is there a way to set the error page for a servlet (i.e. something
comparable to using the page directive with 'errorPage=error.jsp' in
jsp's)?

Thanks,

James

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Setting error page for servlets

2003-08-15 Thread James Michelich
Thanks for the info.

The problem with that solution is this - I have written my own 
exception, and cannot override the list of exceptions associated with 
the doPost() method.

Am I just misinterpreting your previous post, or is there another 
solution for this?

Thanks for the help,

James


-- Original message --
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 15, 2003 1:14:07 PM
Subject: RE: Setting error page for servlets


Howdy,
Seeing how a JSP is a servlet, I'd be very surprised if there was
something you could do with JSPs and not with a servlet ;)

Use the error-page directive in web.xml ;)  The Servlet Spec section
on the deployment descriptor has details and examples.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: James Michelich [mailto:[EMAIL PROTECTED]
Sent: Friday, August 15, 2003 1:00 PM
To: [EMAIL PROTECTED]
Subject: Setting error page for servlets

Is there a way to set the error page for a servlet (i.e. something
comparable to using the page directive with 'errorPage=error.jsp' in
jsp's)?

Thanks,

James

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, 
proprietary and/or privileged.  This e-mail is intended only for the 
individual(s) to whom it is addressed, and may not be saved, copied, 
printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your 
computer system and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Setting error page for servlets

2003-08-15 Thread Shapira, Yoav

Howdy,

The problem with that solution is this - I have written my own
exception, and cannot override the list of exceptions associated with
the doPost() method.

Hmmm... I think the error page might still be able to work.  Try making
your exception a runtime one, so that you don't have to declare it.  The
container will still map it according to the definition in web.xml
(which will have the class of your custom exception).

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Setting error page for servlets

2003-08-15 Thread James Michelich
Thanks! That solution worked out very well for me.

One other quick question, if you don't mind - 

I've checked the servlet specs and found that the request.getRemoteAddr
() method does not throw any exceptions, but I'd like to know if this 
method is always guaranteed to return a non-null, valid IP address.

Thanks,

James



-- Original message --
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 15, 2003 2:36:33 PM
Subject: RE: Setting error page for servlets


Howdy,

The problem with that solution is this - I have written my own
exception, and cannot override the list of exceptions associated with
the doPost() method.

Hmmm... I think the error page might still be able to work.  Try making
your exception a runtime one, so that you don't have to declare it.  
The
container will still map it according to the definition in web.xml
(which will have the class of your custom exception).

Yoav Shapira



This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, 
proprietary and/or privileged.  This e-mail is intended only for the 
individual(s) to whom it is addressed, and may not be saved, copied, 
printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your 
computer system and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Setting error page for servlets

2003-08-15 Thread Shapira, Yoav

Howdy,

I've checked the servlet specs and found that the request.getRemoteAddr
() method does not throw any exceptions, but I'd like to know if this
method is always guaranteed to return a non-null, valid IP address.

You should start a different thread for a different question ;) ;)

No, it's not guaranteed to return a non-null, valid IP address.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]