On redeploy from Eclipse, Tomcat says "Missing application web.xml"

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.
 
O

Oliver Wong

For the benefit of others who encounter this problem, this post
describes the solution to a problem I encountered.

Thanks for posting the fix. Might be a good idea to make it more
explicit in the subject header that this is a fix rather than a question
though; e.g. "FIXED: On redeploy from eclipse, Tomcat says 'Missing
application web.xml'".

- Oliver
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top