My needs are in my Tomcat/localhost log file, I would like as much
information as possible to appear accompanying exceptions that get generated
in there.  At the least, I would like to have the request URI precede the
error in the localhost log.

Even though I have defined error pages in my web.xml file, that doesn't
interact with the localhost log, right?  So what options are available to me
to put request URIs (and other info) into the localhost log?

Thanks, - Dave





Christopher Schultz-2 wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Dave,
> 
> On 5/21/2010 4:41 PM, laredotornado wrote:
>> Thanks for this suggestion.  Just to be sure I'm understanding correctly,
>> the procedure would be
>> 
>> 1. Add an error-page element to my xml doc that will be visited whenever
>> an
>> exception is generated from my JSP or servlet.
>> 2. Configure valve to output a stack trace and the original request URI
>> that
>> generated the error.
>> 
>> Is that right?
> 
> I would choose one or the other: AccessLogValve /might/ be able to meet
> your needs, depending on what they are. If not, implement your own error
> page that logs whatever information you want to wherever you want it to
> go.
> 
>> Also is valve smart enough to understand that I don't want
>> to see "500.jsp" in my log file but rather something like
>> "search_results.jsp?category=1" ?
> 
> I think the AccessLogValve only logs original requests -- that is, it
> won't log included or forwarded files like error pages. I must admit,
> though, that I don't really use the AccessLogValve -- I have Apache
> httpd doing my logging for me.
> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkv3zjAACgkQ9CaO5/Lv0PAotACgwgcboVKDnFhtN6N/QRCxOKFR
> yAcAoJFQ+ARwsJ43xGbJfvS3xVlnF5sw
> =BNo0
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Way-to-record-what-URL-an-error-originated-from-in-my-localhost-file--tp28626297p28659165.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to