M
mistersandiego
For the benefit of others who encounter this problem, this post
describes the solution to a problem I encountered. I've been developing
and continually redeploying a servlet from the Eclipse development
system. All was well until the Tomcat servlet container suddenly began
saying, "Missing application web.xml, using default ..." whenever I
redeployed.
It turns out that the problem was that I had added logging to the
servlet, and I had it writing the log file down in the deployment
directory, in my case,
C:\jakarta-tomcat-5.5.9\webapps\MyServlet\WEB-INF\logfile.log
Evidently when I redeployed, Tomcat wasn't able to undeploy logfile.log
because it was still open and in use by the logger. This caused it to
be unable to redeploy, as I could see nothing in the deployment folders
other than the log file, even after the redeployment had supposedly
finished.
I haven't yet looked to see how to close the log file out (I'm just
getting started with log4j), so as a workaround, I've moved the log
file directory out of the deployment directory structure. Probably not
a bad idea anyway, just to keep the logs from being overwritten by a
redeployment. Anyway, this has fixed the problem.
describes the solution to a problem I encountered. I've been developing
and continually redeploying a servlet from the Eclipse development
system. All was well until the Tomcat servlet container suddenly began
saying, "Missing application web.xml, using default ..." whenever I
redeployed.
It turns out that the problem was that I had added logging to the
servlet, and I had it writing the log file down in the deployment
directory, in my case,
C:\jakarta-tomcat-5.5.9\webapps\MyServlet\WEB-INF\logfile.log
Evidently when I redeployed, Tomcat wasn't able to undeploy logfile.log
because it was still open and in use by the logger. This caused it to
be unable to redeploy, as I could see nothing in the deployment folders
other than the log file, even after the redeployment had supposedly
finished.
I haven't yet looked to see how to close the log file out (I'm just
getting started with log4j), so as a workaround, I've moved the log
file directory out of the deployment directory structure. Probably not
a bad idea anyway, just to keep the logs from being overwritten by a
redeployment. Anyway, this has fixed the problem.