To make use of this library you must run at least Java context.get("maven.compiler.target").
This site will guide you through the components of this library:
Before using this library, make sure that the artifact is in the class path of your Tomcat instance, i.e., in $CATALINA_BASE/lib or $CATALINA_HOME/lib.
This listener is obsolete now since Tomcat includes a close handler from version 7. See here for details on closeMehod.
This listener has been superseded by the ContextNamingInfoListener.
Ever needed your context path, name, version, etc. to be available to your application or your Spring context?
Open your app's context.xml and add:
<Context> […] <!-- Add this --> <Listener className="net.sf.michaelo.tomcat.extras.listeners.ContextNamingInfoListener" /> […] </Context>
It will automagically add your context naming information as environment entries to your webapp's JNDI initial context. For more details see the here.
This valve is obsolete now since Tomcat does include all modifications in the bundled valve. See Bugzilla issue for details.
Consider you cannot change the role names from your company's role store but would like to use readable role names in your app. This can be achieved with a proper mapping performed by this listener. For more details see the here.
To make use of this listener you must declare it in your application. Open your app's context.xml and add:
<Context> […] <!-- Add this --> <Listener className="net.sf.michaelo.tomcat.extras.listeners.PropertiesRoleMappingListener" /> <!-- Followed by your realm --> <!-- <Realm … /> --> […] </Context>
now add the appropriate role mapping file to WEB-INF/role-mapping.properties:
id-xyz = User id-abc = Manager id-foo = Admin
Make sure that your realm implementation actually queries the populated mapping and then you can user the new application roles in your web.xml and with request#isUserInRole().