Re: problematicly fetching manifest info from a war
: A good example of putting some diagnostic help into a JSP page is : Axis happy.jsp (now called HappyAxis.jsp): : : http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/ : webapp/HappyAxis.jsp?view=markup that's a pretty cool looking page (judging by the source) ... ironicly i don't see any version info there ... but some cool ideas about reporting back which jar files important classes are being found in. i went ahead and switched us to putting the JAR in the WAR, and added the basic version info to registry.jsp -Hoss
Re: problematicly fetching manifest info from a war
A good example of putting some diagnostic help into a JSP page is Axis happy.jsp (now called HappyAxis.jsp): http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/ webapp/HappyAxis.jsp?view=markup As for Solr classes - no reason not to JAR them up. Go for it. Erik On Dec 6, 2006, at 9:26 PM, Chris Hostetter wrote: For what it's worth, i was trying to add a quick and diry little bit of code to _info.jsp so that we could display info about the current version of Solr being run by accessing the manifest file, ala... core.getClass().getPackage().getImplementationVersion(); ...and discovered it didn't work. I freaked out a bit, thinking I still hadn't managed to get the manifest working properly, but i'm pretty sure it's right, it's just that for whatever reason that doesn't seem to work with a WAR, if you do the same type of thing with a jar it works fine, we can even modify _info.jsp to get the lucene version info out of the lucene-core-nightly.jar's manifest file using... org.apache.lucene.LucenePackage.class.getPackage ().getImplementationVersion(); Do any WAR/J2EE experts out there know why a JSP in a webapp can get info out of a MANIFEST.MF from a jar in it's classpath, but not out of the webapps own MANIFEST.MF file? One thing we might want to consider, is puting the solt.jar in the solr.war's lib directory, instead of adding all of the classes directly ... it would deal with this problem, and it would make our war look a little cleaner when/if it is unpacked. -Hoss
problematicly fetching manifest info from a war
For what it's worth, i was trying to add a quick and diry little bit of code to _info.jsp so that we could display info about the current version of Solr being run by accessing the manifest file, ala... core.getClass().getPackage().getImplementationVersion(); ...and discovered it didn't work. I freaked out a bit, thinking I still hadn't managed to get the manifest working properly, but i'm pretty sure it's right, it's just that for whatever reason that doesn't seem to work with a WAR, if you do the same type of thing with a jar it works fine, we can even modify _info.jsp to get the lucene version info out of the lucene-core-nightly.jar's manifest file using... org.apache.lucene.LucenePackage.class.getPackage().getImplementationVersion(); Do any WAR/J2EE experts out there know why a JSP in a webapp can get info out of a MANIFEST.MF from a jar in it's classpath, but not out of the webapps own MANIFEST.MF file? One thing we might want to consider, is puting the solt.jar in the solr.war's lib directory, instead of adding all of the classes directly ... it would deal with this problem, and it would make our war look a little cleaner when/if it is unpacked. -Hoss