In this case - it might better to "reinvent the wheel" and not rely on tomcat's apis. Why? Tomcat might change from version to version and re-writing perfrectly good good due to API changes is not fun.

But there are exceptions. Such as the (jakarata) commons api's that tomcat uses. For example: It is safe to rely on digester, commons-collections, and the other commons code since they are in the 5.X distribution. But be prepared to copy those libraries into your installation when you upgrade to tomcat6.

Another caveat about relying on the commons libraries is reversion-ing. If you deploy multiple webapps - each which rely on digester but developed at different times - you might be relying on digester 1.5,1.6,1.7, and 1.8. Luckily - the newer versions are binary compat with older versions - but you might be hit by other bugs.

-Tim

Johnny Kewl wrote:
Been wondering about something...

Often in a tomcat application I use separate XML files for configuration.
I normally end up using a lite weight sax parser that I wrote especially for 
this, but every time I
do this... I think to myself... I'm just doing what has already been done in 
tomcat.

I dont imagine that these internal libs are exposed in a normal tomcat 
application, unless i'm missing something, but I was wondering if its not 
possible to get at the libraries almost as its done in embedded tomcat, so one 
can reduce the overhead of duplicate functionality.

For example if one went for a similar parameter structure in a separate xml 
file... its in not possible to get at that using a tomcat lib?

If so I'd imagine there is a whole range of tricks one could use... In theory a user should never have to go find a base64 lib, or an MD5 lib etc etc... nor anything else that Tomcat has to use???? I think there is a lot of very standard stuff that tomcat could expose through an API... if it has an Xerces lib, why make a user get another one?
For example is it possible to do somelike an XSLT transform without any 
external libs...
It feels like I'm sitting on a gold mine... but I'm still prospecting... if u 
know wot I mean...

Seems like everyone is missing it.... remember reading some article where the 
guy was saying that one can get
at the undocumented sun.misc.BASE64 Decoder which he spent hours discovering...and this was for a tomcat application... seems kinda stupid when Tomcat must have that class already??

So as the actual developers of Tomcat... if you make a web-app... do you download duplicate infrastructure... or do you just dig into a class when you know its there already?


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to