I have developed a number of Tomcat applications. In most of them I do my own user authentication via some web-form page. While this works great, I would like to have the username included in the access log. I've written a very simple valve that takes the Principal from the current session and sets it as the User Principal for the HTTP Request. This way, the user name will be saved with the access log record. I would like to know if it could be added as a standard valve in a future release.
Thanks David R Robison Open Roads Consulting, Inc. http://www.openroadsconsulting.com
<?xml version="1.0"?> <!DOCTYPE mbeans-descriptors PUBLIC "-//Apache Software Foundation//DTD Model MBeans Configuration File" "http://jakarta.apache.org/commons/dtds/mbeans-descriptors.dtd"> <!-- Descriptions of JMX MBeans for ORCI $Id: orci-mbean-descriptors.xml,v 1.1 2003/06/17 19:32:51 drrobison Exp $ --> <mbeans-descriptors> <mbean name="SessionPrincipalValve" className="org.apache.catalina.mbeans.ClassNameMBean" description="Valve that retrieves the Principal from a session attribute" domain="Catalina" group="Valve" type="com.orci.tomcat.SessionPrincipalValve"> <attribute name="className" description="Fully qualified class name of the managed object" type="java.lang.String" writeable="false"/> <attribute name="debug" description="The debugging detail level for this component" type="int"/> <attribute name="sessionAttribute" description="The session attribute containing the principal" type="java.lang.String" writeable="false"/> </mbean> </mbeans-descriptors>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]