1) Adding to the classpath is not going to work because the path part of the is incorrect. I'm sure your package name doesn't start with WIN-INF for example. 2) Adding the classes to WEB-INF/classes will make them available to any classes that are loaded at the web-app level: servlets, jsp, classes in WEB-INF/lib. At least that's the way it works in Weblogic.
Joined: Dec 16, 2003
Thanks Rovus. I understand your answer to the first question. But for the second question, what I want to know was --
I only add "app.war" into the application server's deployment directory. And the server does NOT expand this WAR file into a hierachy directory structure, i.e. you will not see those .class files in WEB-INF/classes. If this is the case, then can the user run "Standalone.class" either within or outside the web application directory ?
Joined: Aug 08, 2003
I don't think it matters whether or not it's expanded. The classes that are in the WEB-INF/classes or WEB-INF/lib directories will only be available among themselves(e.g. to classes in WEB-INF...). For example a classpath that was loaded from the system classpath will not have access to any of the classes in WEB-INF.