0

I have dynamic web project in my Eclipse with Java that was used to create simple SOAP web service that runs on Tomcat 9. Service was published and runs fine.

But I can't find where Eclipse puts java class files and other libraries when I start web service. I can't find any changes in Tomcat folder.

vico
  • 17,051
  • 45
  • 159
  • 315
  • 1
    Does this answer your question? [Where does Eclipse deploy web applications using WTP?](https://stackoverflow.com/questions/2119351/where-does-eclipse-deploy-web-applications-using-wtp) In other words, it's saved in your workspace. IDEs such as Eclipse and NetBeans avoid deploying directly to the targeted Tomcat instance - hence you don't (typically) see the web app showing up in `/webapps` - although you can change this behavior. At least you can in Eclipse, if I recall. – andrewJames Feb 05 '23 at 15:57
  • What actually is the problem you're trying to solve? – nitind Feb 05 '23 at 19:27

1 Answers1

0

I'm usually doing this to find file location of classes

YourClass.getProtectionDomain().getCodeSource().getLocation().getPath()

Replace "YourClass" with any class in your project, debug and evaluate this line, then this will reveal file location.

Also another hint, as per my understanding, a web application can packaged as a war file and can put to tomcat/webapps folder or web application path can be specified manually in a context xml file of tomcat/conf/localhost folder

Chandika
  • 93
  • 1
  • 8