Have a look at this: http://javawebparts.sourceforge.net/javadocs/javawebparts/request/RequestHelpers.html#logAllRequestInfo(javax.servlet.http.HttpServletRequest)
This is a method in the RequestHelpers class in Java Web Parts (http://javawebparts.sourceforge.net). Since it uses JCL for logging, you can configure log4j underneath as appropriate and get what you want (a little more actually- this gives you request attributes, headers and parameters). For the session attributes: http://javawebparts.sourceforge.net/javadocs/javawebparts/session/SessionHelpers.html#logSessionAttributes(javax.servlet.http.HttpSession) Same thing basically: SessionHelpers.logSessionAttributes() Incidentally, there are methods in these two classes that return just the request attributes, just the headers, just the parameters, etc., and return them as a Map, so you can just do: log.info(RequestHelpers.getRequestAttributes(request)); ...if that's all you really want. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] On Tue, February 21, 2006 11:25 am, Mark Womack said: > See the documentation for the MDC class. You will need to do some > setup via a servlet Filter or other mechanism, and it will only apply > to the thread handling the request. > > hth, > -Mark > > On 2/18/06, sreenivas velagapudi <[EMAIL PROTECTED]> wrote: >> Hi, >> Is there any way i can print the request header >> messages and all the session attributes through log4j >> logging . >> when i click any link. >> >> Please help me out. >> >> Thanks >> Sreenivas >> >> >> >> >> >> __________________________________ >> Do you Yahoo!? >> New and Improved Yahoo! Mail - 1GB free storage! >> http://sg.whatsnew.mail.yahoo.com >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]