You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Garret Wilson <ga...@globalmentor.com> on 2020/06/08 13:59:28 UTC
using custom classes in Tomcat configuration files
Hi, all. I'm getting close to releasing a new version of my Guise Mummy
static site generation software.
I gave a presentation over Guise Mummy's use of embedded Tomcat to serve
the generated site locally for testing before deployment. It uses a
custom site root and web resource
https://guise.io/mummy/present/clean-urls
Although in my use case I instantiation and connect these things
programmatically, someone in attendance (I think it was Remy, or maybe
Chris) mentioned that I could also reference the customized versions in
one of the configuration files and Tomcat would create the instance
graph automatically.
I want to make the library flexible, so in this version I'd like to make
sure that's possible. Could you remind me on the prerequisites for this,
and what documentation I could look at? Does it use JavaBean conventions
or some other conventions? (I assume I just need a no-argument
constructor and some getters/setters, but I want to verify.) And in
which Tomcat configuration would they go?
Thanks,
Garret
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: using custom classes in Tomcat configuration files
Posted by Garret Wilson <ga...@globalmentor.com>.
Hi everyone. I thought I would circle back and answer my own question
from back in June 2020 (see message thread below).
The thing that creates objects from the server.xml configuration file is
the Digester
(https://tomcat.apache.org/tomcat-9.0-doc/api/org/apache/tomcat/util/digester/Digester.html),
and it uses the processing rules described in the digester package
summary
(https://tomcat.apache.org/tomcat-9.0-doc/api/org/apache/tomcat/util/digester/package-summary.html#doc.Rules).
Of particular note are the ObjectCreateRule
(https://tomcat.apache.org/tomcat-9.0-doc/api/org/apache/tomcat/util/digester/ObjectCreateRule.html)
and the SetPropertiesRule
(https://tomcat.apache.org/tomcat-9.0-doc/api/org/apache/tomcat/util/digester/SetPropertiesRule.html).
You can read more about my upgrading my Guise Mummy components to be
able to be used in Tomcat configuration files, as well as see related
code changes, at https://globalmentor.atlassian.net/browse/GUISE-150 .
Now that I have all this working, I won't be coding on Tomcat as often,
so I'm going to drop off this list for a while to cut down on my inbox
influx. Thanks for the opportunity to participate in ApacheCon last
year, and I hope the virtual event this year is a success. I enjoyed
meeting those of you I met in person, and if things go well maybe I'll
meet some of you again at an in-face conference in the future.
All the best and stay safe.
Garret
On 6/8/2020 6:59 AM, Garret Wilson wrote:
> Hi, all. I'm getting close to releasing a new version of my Guise
> Mummy static site generation software.
>
> I gave a presentation over Guise Mummy's use of embedded Tomcat to
> serve the generated site locally for testing before deployment. It
> uses a custom site root and web resource
>
> https://guise.io/mummy/present/clean-urls
>
> Although in my use case I instantiation and connect these things
> programmatically, someone in attendance (I think it was Remy, or maybe
> Chris) mentioned that I could also reference the customized versions
> in one of the configuration files and Tomcat would create the instance
> graph automatically.
>
> I want to make the library flexible, so in this version I'd like to
> make sure that's possible. Could you remind me on the prerequisites
> for this, and what documentation I could look at? Does it use JavaBean
> conventions or some other conventions? (I assume I just need a
> no-argument constructor and some getters/setters, but I want to
> verify.) And in which Tomcat configuration would they go?
>
> Thanks,
>
> Garret
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org