I made a mistake I wanted instead of war file I wrote a jar file. So the web application has been already created. My question is if I have to compile a java class that extends one of the classes included in a jar file. Do I have to extract from war file necessary libraries need for the compilation of my file or there is a more elegant way to handle this?
Christopher Schultz-2 wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > To whom it may concern, > > polock wrote: > | I just put a jar file in my webapps folder > > That's not the place to put it. > > | now I would like to write > | some java files with classes that are available within jar file that > will be > | also part of a web application. > > | Where should I place this new java files? > > You need to create a web application, then. Find an online tutorial or a > book, and you'll see that a web application needs to have a directory > structure like this: > > webapps/yourwebapp > webapps/yourwebapp/WEB-INF > webapps/yourwebapp/WEB-INF/lib > webapps/yourwebapp/WEB-INF/classes > > Your JAR files go under the "lib" directory and your compiled Java > classes go under the "classes" directory (of course, in > package-appropriate subdirectories). You should really also have a > web.xml file in WEB-INF. > > Note that the Java source files are irrelevant to a web application: > they need not be included. > > | Should they be compiled? > > Yes, and they should be installed under the "classes" directory as > indicated above. > > | Also I would appreciate a reffernce to some documents where this is > | explained! > > GIYF (Google is your friend): try searching the web for this > information, as it is plentiful. Ignore anything that references "Apache > JServ" which is an outdated servlet container that has been out of use > for quite a long time (yet the documentation seems to survive on the web > for some reason). > > - -chris > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.8 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAke0eJ4ACgkQ9CaO5/Lv0PAV3gCeJDvpuaDehMXx/3mFreIOZWqb > 5i8AoLgOeqI4AzX8l9Wvbgt9gCxy6ZBX > =Gzpw > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/using-a-class-from-jar-file-tp15481864p15547050.html Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]