The html:errors tag will display a generic message but how can I display the details of what went wrong (e.g. the Exception's stacktrace) in the designated error jsp?
What are the options? Can someone point me at some docs that go into this in more detail? Thanks, -Miles > -----Original Message----- > From: Amleto Di Salle [mailto:[EMAIL PROTECTED] > Sent: 11 January 2005 09:38 > To: 'Struts Users Mailing List' > Subject: R: Handling the exceptions in struts > > Hi, > You can use the tag "exception" inside the tag action for > local exception, or global-exceptions for global ones. > > For example: > <action type="com.foo.FooAction" path="/fooPath" > > <exception key="foo.error" path="error.in.form" > scope="request" type="java.lang.NullPointerException"/> > <forward name="okform" path="okform"/> </action> > > or > <global-exceptions> > <exception key="global.error.invalidlogin" path="error" > scope="request" type="com.foo.InvalidLoginException"/> > <exception key="global.error.invalidtoken" > path="error.in.form" > scope="request" type="com.foo.TokenInvalidException"/> > </global-exceptions> > > The attribute "path" can be a JSP page or a tiles which > contains the html:errors tag. > The attribute key contains a resource message. > > BR > /Amleto > > > > -----Messaggio originale----- > > Da: Manisha Sathe [mailto:[EMAIL PROTECTED] > > Inviato: marted́ 11 gennaio 2005 10.26 > > A: user@struts.apache.org > > Oggetto: Handling the exceptions in struts > > > > > > I am trying to have a common routine for Exceptions. > > > > Inside Action Class I am calling this common method, passing > > ActionMapping as parameter, doing some stuff like logging and then > > forwarding to error page. > > > > But the problem is what if i get exception in my normal Common Java > > files (which does not have ActionMapping) - then how i can > forward it > > to error page ? > > > > I am bit confused in how to handle exceptions in effective way. Pls > > guide me. > > > > regards > > Manisha > > > > > > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam protection around > > http://mail.yahoo.com > > > > -- > > No virus found in this incoming message. > > Checked by AVG Anti-Virus. > > Version: 7.0.300 / Virus Database: 265.6.10 - Release Date: > 10/01/2005 > > > > > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.300 / Virus Database: 265.6.10 - Release Date: 10/01/2005 > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]