You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mike Jasnowski <mj...@bea.com> on 2003/09/29 18:37:19 UTC

RE: Prevent display of JspException

Is this exception coming from you're own code? Can you do a File.exists()
first and throw something more app specific that a Struts exception handler
could catch?

-----Original Message-----
From: Wes Kubo [mailto:wkubo@galdosinc.com]
Sent: Monday, September 29, 2003 12:42 PM
To: Struts Users Mailing List
Subject: Prevent display of JspException


I've been doing some refactoring with my ApplicationResources.properties and
every once in a while I get a page that shows a JspException when I've
mistyped a property name or whatever. Is there anyway of catching the
JspException at this compilcation point and displaying a different message
(or none at all)?

Theoretically, this should never happen once we deploy, but if someone mucks
with an image path or something is missing, I'd rather the client deal with
a missing image rather than see the JspException trace.

Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Prevent display of JspException

Posted by Mike Jasnowski <mj...@bea.com>.
I know this might not be the behavior you want, but at least the app
wouldn't crash.

-----Original Message-----
From: Mike Jasnowski [mailto:mjasnows@bea.com]
Sent: Monday, September 29, 2003 12:59 PM
To: Wes Kubo; Struts Users Mailing List
Subject: RE: Prevent display of JspException


Ahh, in the case of message keys, there is an attribute you can use to
change the behavior of missing keys, I believe it's called "null", here is
the description from the dtd

     null            Set to "true" if you want our message resources to
return a
                     null string for unknown message keys, or "false" to
return a
                     message with the bad key value.



-----Original Message-----
From: Wes Kubo [mailto:wkubo@galdosinc.com]
Sent: Monday, September 29, 2003 1:02 PM
To: Mike Jasnowski; Struts Users Mailing List
Subject: RE: Prevent display of JspException


No. It would be thrown by struts code, say if somebody mucked with my
ApplicationResources.properties and a certain message key couldn't be found.
This is something that would happen when the JSPs are compiled. There is
really only an off chance of this occuring in production, just wanted to see
if something could be done should it arise.

-----Original Message-----
From: Mike Jasnowski [mailto:mjasnows@bea.com]
Sent: Monday, September 29, 2003 9:40 AM
To: Struts Users Mailing List
Subject: RE: Prevent display of JspException


your own...

-----Original Message-----
From: Mike Jasnowski [mailto:mjasnows@bea.com]
Sent: Monday, September 29, 2003 12:37 PM
To: Struts Users Mailing List
Subject: RE: Prevent display of JspException


Is this exception coming from you're own code? Can you do a File.exists()
first and throw something more app specific that a Struts exception handler
could catch?

-----Original Message-----
From: Wes Kubo [mailto:wkubo@galdosinc.com]
Sent: Monday, September 29, 2003 12:42 PM
To: Struts Users Mailing List
Subject: Prevent display of JspException


I've been doing some refactoring with my ApplicationResources.properties and
every once in a while I get a page that shows a JspException when I've
mistyped a property name or whatever. Is there anyway of catching the
JspException at this compilcation point and displaying a different message
(or none at all)?

Theoretically, this should never happen once we deploy, but if someone mucks
with an image path or something is missing, I'd rather the client deal with
a missing image rather than see the JspException trace.

Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Prevent display of JspException

Posted by Mike Jasnowski <mj...@bea.com>.
Ahh, in the case of message keys, there is an attribute you can use to
change the behavior of missing keys, I believe it's called "null", here is
the description from the dtd

     null            Set to "true" if you want our message resources to
return a
                     null string for unknown message keys, or "false" to
return a
                     message with the bad key value.



-----Original Message-----
From: Wes Kubo [mailto:wkubo@galdosinc.com]
Sent: Monday, September 29, 2003 1:02 PM
To: Mike Jasnowski; Struts Users Mailing List
Subject: RE: Prevent display of JspException


No. It would be thrown by struts code, say if somebody mucked with my
ApplicationResources.properties and a certain message key couldn't be found.
This is something that would happen when the JSPs are compiled. There is
really only an off chance of this occuring in production, just wanted to see
if something could be done should it arise.

-----Original Message-----
From: Mike Jasnowski [mailto:mjasnows@bea.com]
Sent: Monday, September 29, 2003 9:40 AM
To: Struts Users Mailing List
Subject: RE: Prevent display of JspException


your own...

-----Original Message-----
From: Mike Jasnowski [mailto:mjasnows@bea.com]
Sent: Monday, September 29, 2003 12:37 PM
To: Struts Users Mailing List
Subject: RE: Prevent display of JspException


Is this exception coming from you're own code? Can you do a File.exists()
first and throw something more app specific that a Struts exception handler
could catch?

-----Original Message-----
From: Wes Kubo [mailto:wkubo@galdosinc.com]
Sent: Monday, September 29, 2003 12:42 PM
To: Struts Users Mailing List
Subject: Prevent display of JspException


I've been doing some refactoring with my ApplicationResources.properties and
every once in a while I get a page that shows a JspException when I've
mistyped a property name or whatever. Is there anyway of catching the
JspException at this compilcation point and displaying a different message
(or none at all)?

Theoretically, this should never happen once we deploy, but if someone mucks
with an image path or something is missing, I'd rather the client deal with
a missing image rather than see the JspException trace.

Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Prevent display of JspException

Posted by Wes Kubo <wk...@galdosinc.com>.
No. It would be thrown by struts code, say if somebody mucked with my
ApplicationResources.properties and a certain message key couldn't be found.
This is something that would happen when the JSPs are compiled. There is
really only an off chance of this occuring in production, just wanted to see
if something could be done should it arise.

-----Original Message-----
From: Mike Jasnowski [mailto:mjasnows@bea.com]
Sent: Monday, September 29, 2003 9:40 AM
To: Struts Users Mailing List
Subject: RE: Prevent display of JspException


your own...

-----Original Message-----
From: Mike Jasnowski [mailto:mjasnows@bea.com]
Sent: Monday, September 29, 2003 12:37 PM
To: Struts Users Mailing List
Subject: RE: Prevent display of JspException


Is this exception coming from you're own code? Can you do a File.exists()
first and throw something more app specific that a Struts exception handler
could catch?

-----Original Message-----
From: Wes Kubo [mailto:wkubo@galdosinc.com]
Sent: Monday, September 29, 2003 12:42 PM
To: Struts Users Mailing List
Subject: Prevent display of JspException


I've been doing some refactoring with my ApplicationResources.properties and
every once in a while I get a page that shows a JspException when I've
mistyped a property name or whatever. Is there anyway of catching the
JspException at this compilcation point and displaying a different message
(or none at all)?

Theoretically, this should never happen once we deploy, but if someone mucks
with an image path or something is missing, I'd rather the client deal with
a missing image rather than see the JspException trace.

Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Prevent display of JspException

Posted by Mike Jasnowski <mj...@bea.com>.
your own...

-----Original Message-----
From: Mike Jasnowski [mailto:mjasnows@bea.com]
Sent: Monday, September 29, 2003 12:37 PM
To: Struts Users Mailing List
Subject: RE: Prevent display of JspException


Is this exception coming from you're own code? Can you do a File.exists()
first and throw something more app specific that a Struts exception handler
could catch?

-----Original Message-----
From: Wes Kubo [mailto:wkubo@galdosinc.com]
Sent: Monday, September 29, 2003 12:42 PM
To: Struts Users Mailing List
Subject: Prevent display of JspException


I've been doing some refactoring with my ApplicationResources.properties and
every once in a while I get a page that shows a JspException when I've
mistyped a property name or whatever. Is there anyway of catching the
JspException at this compilcation point and displaying a different message
(or none at all)?

Theoretically, this should never happen once we deploy, but if someone mucks
with an image path or something is missing, I'd rather the client deal with
a missing image rather than see the JspException trace.

Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org