tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakarta" <jakarta-pi...@interlap.com.ar>
Subject Re: <html:errors/>
Date Wed, 29 Jan 2003 15:34:51 GMT
Thanks! Looks interesting. I've not tested it yet. BUT i'm using the
<exception> option in the struts-config.xml to show via <html:errors/> some
relevant exceptions to the user (and mail them to me --as bugs?--). so who
will catch the exceptions? j4l, the strut's ExceptionHandler or both?

spying inside the strut's sources i've found the ActionErrors are stored as
context's attributes. ergo inside the jsp source i can retrieve them this
way

ActionErrors e = (ActionErrors)
request.getAttribute(ActionErrors.GLOBAL_ERROR);

and mail them with a JavaMail session.
but it'll be good to trap all other exceptions. i'll test it

regards

----- Original Message -----
From: "Jon Wingfield" <jon.wingfield@mkodo.com>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Tuesday, January 28, 2003 6:15 PM
Subject: Re: <html:errors/>


> Are you using log4j? If you are then chack out the
> org.apache.log4j.net.SMPTAppender. It sends a mail each time a message
> of the required severity is logged.
>
>
http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/net/SMTPAppender.h
tml
>
> example of log4j.properies portion for this appender:
>
> log4j.rootCategory=info, mail
>
> log4j.appender.mail=org.apache.log4j.net.SMTPAppender
> log4j.appender.mail.To=sysadmin@your.domain.com
> log4j.appender.mail.From=your.webapp@your.domain.com
> log4j.appender.mail.SMTPHost=@MAIL_HOST@
> log4j.appender.mail.Threshold=ERROR
> log4j.appender.mail.BufferSize=1
> log4j.appender.mail.Subject=Application Error
>
>
> Pablo L. Crivaro wrote:
> > hi
> > i want access the error list written by the <html:errors/> tag usign
java,
> > not the tag (i wanna submit exceptions by mail automatically). how is
that?
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>
> >
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>
>
>


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


Mime
View raw message