0
votes

I have a normal Java EE Servlet on Tomcat project in Eclipse. When I start the Tomcat server (before I even start running the Servlet) inside Eclipse it attempts to deploy a web application directory for everything in my D: drive. It even attempts to deploy a web application on the D:\$RECYCLE.BIN directory. Then says it finished.

Here's an image of the project organization in Eclipse.

enter image description here

Can anyone guess what setting or xml directive is making it do this?

Dec 27, 2018 1:27:51 PM org.apache.catalina.core.StandardEngine startInternal

INFO: Starting Servlet Engine: Apache Tomcat/8.0.36

Dec 27, 2018 1:27:55 PM org.apache.jasper.servlet.TldScanner scanJars

INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

Dec 27, 2018 1:27:58 PM org.apache.jasper.servlet.TldScanner scanJars

INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

Dec 27, 2018 1:27:58 PM org.apache.catalina.startup.HostConfig deployDirectory

INFO: Deploying web application directory D:\$RECYCLE.BIN

Dec 27, 2018 1:27:59 PM org.apache.jasper.servlet.TldScanner scanJars

INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

Dec 27, 2018 1:27:59 PM org.apache.catalina.startup.HostConfig deployDirectory

INFO: Deployment of web application directory D:\$RECYCLE.BIN has finished in 1,124 ms

Dec 27, 2018 1:27:59 PM org.apache.catalina.startup.HostConfig deployDirectory

INFO: Deploying web application directory D:\Customers

Dec 27, 2018 1:28:00 PM org.apache.jasper.servlet.TldScanner scanJars

INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

Dec 27, 2018 1:28:00 PM org.apache.catalina.startup.HostConfig deployDirectory

INFO: Deployment of web application directory D:\Customers has finished in 927 ms
1
Did you check this topic?Gozus19
You should show us the structure and location of your normal project. What is D:\Customers in this setup? Since this isn't reported everywhere, the assumption is that there is something wrong with your project specifically. Helps us figure it out by giving us details.nitind
D:\Customers is just another directory that has nothing to do with this project. Somehow when I launch the Tomcat Server it attempt to deploy a Web App in EVERY directory on my D: drive.Joe C
Take a look at your server configuration. Java EE perspective - Server tab - double click on your server.Evgeni Enchev
Thx, I can't see anything that looks suspicious. Why would Tomcat attempt to deploy any web application in the first place. Shouldn't the Tomcat server just wait for someone to access a Web Application?Joe C

1 Answers

0
votes

I can't explain why this consistent mis-configuration happens but here is how to fix it. Find your 'server.xml' file in your Eclipse Workspace folder. If you find more than one then avoid the one inside a 'tmp0' directory and do not get confused with 'servers.xml'.

Find the 'Host' property and set the 'appBase' to the directory where your Web App is located and / or set 'autoDeploy' to 'false'.

I do not know why but whenever I added a Tomcat server in the Eclipse Workspace it automatically set 'appBase' to 'D:\' and 'autoDeploy' to 'true'. I tried reinstalling Eclipse, creating new workspaces from scratch. It was always the same result. As such it searched every folder in my D drive for a Web App to run.