Hi guys,

I spent my day into struggling with Tomcat 6 and I just wanted to ask you
for some ideas and whether what I'm doing seems right to you.

So, I'm trying to port a legacy application which is using Tomcat 5.0.28 to
Tomcat 6.0.20.
While most of the Tomcat 5.0.28 properties are read from the server.xml,
some of the Connector properties(keyStore, keyPass, protocols, connector
address, port ...) are retrieved from other configuration files which are in
fact related to the application.
Using Tomcat 5.0.28 this is implemented by providing a custom implementation
for the CoyoteConnector and CoyoteServerSocketFactory.

Obviously, I can't do this with Tomcat6.
What I intend to do is write a class that extends the Catalina class (so
that the Digester can read my server.xml file) and then just overwrite the
addConnector method in order to overwrite the Connector properties "on the
fly" and the load method ( so that I can push my implementation in the
digester).

Then in order to use the Bootstrap (to load classes), I'll have to extend it
so that I can change the Catalina implementation with my own.
Then for starting tomcat I'll use my bootstrap.

Please, have in mind that I really don't like this hacky approach. However,
I can't do much to change it since I'm not the one who tells the
requirements.

So, what do you think? Some easier way to achieve this?

Thanks,
Ivelin

Reply via email to