Please excuse me if this is a duplicate of my earlier post. Not sure if the first one was posted correctly.
I have a need to send log4j dynamic info during each reqest so that it will display the user id of the requestor. I am using log4j's Nested Diagnostic Context (NDC) to do this and it seems to work well. I have hacked this into a Tapestry 3.0.3 application to get it to work and would like to know a better way to do it. Currently, Login.java takes care of pushing the NDC so that subsequent requests in the log will show the user's id. I am then using my Border component to clear the NDC. It does seem to work, but I think there is a better approach to take. I attempted to setup my own Tapestry Engine to do this, but it would blow up on any request with a call to createEngine causing an InstantiationException with a ServletException. Is an Engine the way to go? Any help on how to setup a custom engine? Would I be better off to create a servlet filter and move it outside of Tapestry? Thanks! Joseph
