RE: OReilly Struts book

2002-03-19 Thread Eric L. Ma

I am sure you can convince Tim O'Reilly that community review does help
to sell J2EE hot topic books - just take a look at The Middleware
Company's EJB-related books.  Plus, O'Reilly did allow Richard
Monson-Haefel to post his EJB book chapters on the web last July.  I am
sure a Struts book would generate at least the same amount of interests,
if not more.  BTW, you should post a message at theServersdie.com so
more people will become aware of the book.




RE: How to use Log4j with a startup logging servlet

2002-01-16 Thread Eric L. Ma

Thanks, gentlemen.  I start to get the idea but am still fuzzy on how to
issue logging requests in my custom Action classes.  Do I have to
declare a static Category variable in each and every Action class I
write?  Please share some code on how logging is actually done, now that
I know how to set up the startup servlet.

Eric

-Original Message-
From: Eric Ma [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 15, 2002 12:33 PM
To: [EMAIL PROTECTED]
Subject: How to use Log4j with a startup logging servlet

I want to use Log4J for logging exceptions thrown in a Struts-based web
app.  After searching through this list, I found 2 common solutions:

1. Extend the Struts ActionServlet and override the init() method to set
up a Log4J Category.  Then in any custom Action class I can just call
servlet.Category.debug() (let's assume Category is a protected or public
variable).

2. Write a separate startup servlet and again set up LOG4J in the init()
method.  But my question is, how do I invoke this servlet from my custom
Action class?  Do I need to do a RequestDispatcher.forward() to the
servlet when an exception is thrown?  Then how do I get back to the page
I am on to display the error message?

Eric Ma


--

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: