Re: Using getImplementationVersion() to read MANIFEST.MF

2007-03-05 Thread Paul A. Hoadley
On 05/03/2007, at 6:22 PM, Caldarale, Charles R wrote: From: Paul A. Hoadley [mailto:[EMAIL PROTECTED] Subject: Re: Using getImplementationVersion() to read MANIFEST.MF I ended up doing something quite like this (though using java.util.jar.Manifest) Watch out for that - it won't work unless

RE: Using getImplementationVersion() to read MANIFEST.MF

2007-03-05 Thread Caldarale, Charles R
From: Paul A. Hoadley [mailto:[EMAIL PROTECTED] Subject: Re: Using getImplementationVersion() to read MANIFEST.MF Oh, I just meant I used java.util.jar.Manifest to parse the manifest instead of java.util.Properties. I still used ServletContext.getResourceAsStream() to obtain

Re: Using getImplementationVersion() to read MANIFEST.MF

2007-03-05 Thread Paul A. Hoadley
On 06/03/2007, at 12:53 AM, Caldarale, Charles R wrote: I guess the question is this: is there another way for a non-servlet class instantiated within a servlet container to obtain a ServletContext object? How is your bean created? I just instantiate it in some JSP code (in particular, in a

Re: Using getImplementationVersion() to read MANIFEST.MF

2007-03-04 Thread Paul A . Hoadley
On 03/03/2007, at 5:42 PM, Paul A. Hoadley wrote: Ultimately what I want to do is quite simple: display a build number in the footer of some JSP pages. I'm using Ant's 'buildnumber' task to increment the build number at each compile, and I am adding a global 'Implementation-Version'

RE: Using getImplementationVersion() to read MANIFEST.MF

2007-03-04 Thread Caldarale, Charles R
From: Paul A. Hoadley [mailto:[EMAIL PROTECTED] Subject: Re: Using getImplementationVersion() to read MANIFEST.MF 1. How can I read the value of the property from some arbitrary class, say /WEB-INF/classes/some/package/Version.class? You can use the following construct to create

Re: Using getImplementationVersion() to read MANIFEST.MF

2007-03-04 Thread Paul A. Hoadley
On 05/03/2007, at 5:39 PM, Caldarale, Charles R wrote: From: Paul A. Hoadley [mailto:[EMAIL PROTECTED] Subject: Re: Using getImplementationVersion() to read MANIFEST.MF 1. How can I read the value of the property from some arbitrary class, say /WEB-INF/classes/some/package/Version.class

RE: Using getImplementationVersion() to read MANIFEST.MF

2007-03-04 Thread Caldarale, Charles R
From: Paul A. Hoadley [mailto:[EMAIL PROTECTED] Subject: Re: Using getImplementationVersion() to read MANIFEST.MF I ended up doing something quite like this (though using java.util.jar.Manifest) Watch out for that - it won't work unless the app is deployed as a .war on a device