We are using struts 1.3 in our application. As per my knowledge, the main purpose of MANIFEST.MF is to indicate the class name that holds the main method. I can see MANIFEST.MF file under META-INF directory, but it doesn't show this information. Then what is the use of it?
Manifest-Version: 1.0
Class-Path:
On this question, Tim Holloway 1 writes:
The class-path specification is for use when executing Java applications via the "java -jar" command. It doesn't apply to webapps (WARs).
Two reasons for this:
Unlike Applications, which normally would only include their containing JAR in the classpath, webapps have a designated location for class libraries (the WEB-INF/classes and WEB-INF/lib directories).
WARs must be self-contained. That is, no references to JARs or classpath directories external to the directory structure of the WAR itself. Since there's already a designated location internal to the WAR, it's better (and more secure) to use that instead of allowing people to splatter code resources any old place.
In cases where there is some reason why a library isn't feasible in the standard location, your options are basically to put it in the container's classpath as is the case for things like the jdbc drivers, or you could add a custom classpath manager to the WAR.
Notes