tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: add context.getVersion() and context.getWebAppName() ?
Date Mon, 18 Sep 2000 23:04:04 GMT
Daniel Kehoe wrote:

> Tomcat has a context.getDescription() method (it is used in the
> ContextAdmin example).
>
> Could we also have context.getVersion() and context.getWebAppName() methods?
>

Since these methods are not in the standard API, these methods would not be
visible to web apps unless you marked them as "trusted".

>
> I'd like to have a consistent place for a version number and the name of
> the web application.
>
> It'd be nice if it was in the servlet API, but short of that, could we have
> it in Tomcat?
>

One pretty simple way to do this kind of thing would be to parse the deployment
descriptor (WEB-INF/web.xml) yourself and extract the information you want.
That way, you would not be tied to Tomcat.  However, I don't see any elements
there (or within Tomcat internally) that the version number of the application
itself is returned.


> Daniel
> kehoe@fortuity.com
>

Craig McClanahan

====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat



Mime
View raw message