Ensure custom Tomcat components are easily reusable.

Description

When I gave a presentation at ApacheCon North America 2019, someone in attendance (I think it was Remy, or maybe Chris) mentioned that if the custom Tomcat components (e.g. SiteDirResourceSet) were designed correctly, a developer could use them in the server configuration without even using Guise.

I'm not sure what this entails. It probably just needs a no-argument constructor and some getters/setters, but this needs to be researched.

Environment

None

Activity

Show:
Garret Wilson
June 15, 2020, 1:53 PM
Edited

After some research I think the configuration from server.xml may be done by the the Digester, according to the process rules described in the digester package summary — specifically the ObjectCreateRule and the SetPropertiesRule.

Garret Wilson
June 17, 2020, 1:54 PM
Edited

To use this in a deployed Tomcat, my best guess (without having tried it yet) would be to put the define the custom SiteRoot in context.xml. Going by the embedded version, I should be able to add a <Resources> element and specify io.guise.catalina.webresources.SiteRoot as the className attribute:

Java class name of the implementation to use. This class must implement the org.apache.catalina.WebResourceRoot interface. If not specified, the standard value (defined below) will be used.

Assignee

Garret Wilson

Reporter

Garret Wilson

Labels

None

Components

Fix versions

Priority

Minor
Configure