Try looking at ServletContext.getResourceAsStream(path)
--David
[EMAIL PROTECTED] wrote:
Hi all!
Is it possible to get access to the MANIFEST.MF in META-INF from my
web-application?
I would like to read the version info stored there to be used in my
web-applicaton.
InputStream mfis =
this.getClass().getClassLoader().getResourceAsStream("META-INF/MANIFEST.MF"
);
Manifest mf = new Manifest( mfis );
does not work, and
String jarname = System.getProperties().getProperty("java.class.path");
JarFile jarfile = new JarFile(jarname);
Manifest manifest = jarfile.getManifest();
does not seem to work either. Or is there something wrong?
If I copy the MANIFEST.MF to WEB-INF/classes, the access by InputStream
works, but that would
mean doubling data.
Thanks
Peter
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
David Smith
Network Operations Supervisor
Department of Entomology
Cornell University
2132 Comstock Hall
Ithaca, NY 14853
Phone: (607) 255-9571
Fax: (607) 255-0940
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]