tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kehoe <ke...@fortuity.com>
Subject Re: add context.getVersion() and context.getWebAppName() ?
Date Tue, 19 Sep 2000 06:06:56 GMT
Craig and Costin,

Your clarification was helpful. Seems like what I want belongs in the 
servlet API, not in a tomcat-specific implementation. So I sent in the 
following, FYI.

Thanks!
Daniel

>Date: Mon, 18 Sep 2000 22:40:01 -0700
>To: servletapi-feedback@eng.sun.com
>From: Daniel Kehoe <kehoe@fortuity.com>
>Subject: ServletContext needs getWebAppName() and getWebAppVersion()
>   methods
>
>Customers who use our web applications need to be able to tell us what 
>version of the application they are using when they ask for support. In 
>general, as web applications take the place of client/server apps, it 
>becomes more important to display the application name and version number. 
>I'd like to see a standard interface to accommodate this so that web 
>application developers are encouraged to provide an application name and 
>version number in a consistent and predictable fashion.
>
>Please consider adding the following methods to javax.servlet.ServletContext:
>
>getWebAppName()
>public java.lang.String getWebAppName(java.lang.String name)
>Returns a String containing the value of an element in the deployment 
>descriptor identifying the name of the web application. For example,
>"WebAccess."
>Returns: a String containing a web application name.
>
>getWebAppVersion()
>public java.lang.String getWebAppVersion(java.lang.String name)
>Returns a String containing the value of an element in the deployment 
>descriptor identifying the version of the web application. For example,
>"1.0 beta 1."
>Returns: a String containing a version number or other identifier.
>
>The deployment descriptor <web-app><display-name> element could be the 
>default source of the name of the web application. There is no existing 
>element in the deployment descriptor to provide a web application version 
>number. A <web-app><version> element  could be added. But there should 
>also be "set" methods
>public java.lang.String setWebAppName(java.lang.String name)
>public java.lang.String setWebAppVersion(java.lang.String name)
>that allow an application developer to programmatically set the name and 
>version number of the web application overriding any value established in 
>the deployment descriptor. A deployment descriptor may be modified for a 
>particular deployment (for example, a system administrator may change a 
><context-param> value) but an application developer will likely desire 
>that a web application name and version number be immutable.
>
>I realize that ServletContext's set/getAttribute() methods can be used to 
>store any desired name/object pair including the name and version number 
>of the web application. However, I believe there is a universal need for 
>this information and ad hoc implementations make more work for developers 
>and those who maintain the code.
>
>Thank you for giving this request your consideration.
>
>Daniel Kehoe
>Fortuity Consulting
>http://www.fortuity.com/
>kehoe@fortuity.com
>
>


Mime
View raw message