0

After deploying a web application war on tomcat , i want to run the web application's classes within tomcat folder

so i found this path (C:\software\apache-tomcat-7\apache-tomcat-7.0.28\wtpwebapps\SeleniumebDriverProject\WEB-INF\classes) that contain all classes .

I want you to correct me if it's not the right folder

Thank you in advance

Amira Manai
  • 2,599
  • 8
  • 40
  • 60

1 Answers1

1

WEB-INF/classes is indeed the standard place to put a web application's classes, at least those that haven't been packaged up into jar files, which are usually located in WEB-INF/lib.

If your Tomcat is configured to unpack war files (unpackWARs="true") then you should see the files on disk after starting Tomcat with the war file in place.

If you are trying to run one of the application's classes from the command line, and it is located in WEB-INF/classes, then you need to add this to the classpath, for example:

java -classpath C:\software\apache-tomcat-7\apache-tomcat-7.0.28\wtpwebapps\SeleniumebDriverProject\WEB-INF\classes org.thepackage.MainClass

Bear in mind that any jar files this class uses will also need to be added to the classpath.

If, as your comment to Chin Boon suggested, you are looking for the java source files then these may not have been shipped within the war file - if so they won't be available (you'll need to download them elsewhere). If they are, then try WEB-INF/src

Martin Wilson
  • 3,386
  • 1
  • 24
  • 29