tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <>
Subject Re: conf/Catalina/localhost/myWebApp.xml context file disappears
Date Tue, 23 Apr 2013 11:04:54 GMT
On 21/04/2013 13:57, Jakub 1983 wrote:
> Mark,
> sorry I didn't reply so long, but my previous tomcat was messed with
> tests and many attempts, now I did everything from start with clean
> tomcat installation and confirm context xml disappears.
> steps to reproduce
> 1) make dir  C:\tomcat_test
> 2) download and unpack it in C:\tomcat_test

The list strips attachments but there is enough information for me to
reproduce the behaviour with a simple webapp. (The moral here is that
you should aim to reproduce any problem you report with as simple a
webapp as possible. A 5 line JSP and a 3 line context.xml file is all
that is needed for this issue.)

> 3) in C:\tomcat_test unpack attached jdbc.7z
> 4) start tomcat with startup.bat
> 4) in c:\tomcat_test\jdbc> call ant deploy-war

OK. That copies the WAR file to the appBase of a running Tomcat instance
so with the default config it will be unpacked and deployed.

> 5) open http://localhost:8080/jdbc/select.jsp result is:
> org.apache.jasper.JasperException: An exception occurred processing JSP
> page /select.jsp at line 22 ..... 
> root cause 
> javax.servlet.ServletException: javax.naming.NameNotFoundException: Name
> [jdbc/Test] is not bound in this Context. Unable to find [jdbc].
> 6) into C:\tomcat_test\apache-tomcat-7.0.39\conf\Catalina\localhost
> insert attached jdbc.xml

OK. That will have no effect as although Tomcat sees the new file it
does not redploy the webapp (arguably it should at this point - I'll
look into that).

> 7) close tomcat console
> 8) start tomcat with startup.bat

That causes Tomcat to deploy the webapp using the context.xml file.

> 9) again open result is OK, config works fine, error is caused by lack
> of h2 jar (org.apache.jasper.JasperException:
> javax.servlet.ServletException:
> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver
> class 'org.h2.Driver')
> 10) now in notepad++ open
> C:\tomcat_test\jdbc\src\main\webapp\select.jsp, change title to
> <title>Simple jsp page 2</t>
> 11) as in 4) in c:\tomcat_test\jdbc> call ant deploy-war
> jdbc.xml disappeared from

This is the interesting bit. I do see the context.xml file being deleted.

I'm not sure if this is the correct behaviour or not. There are a lot of
variables when looking at auto-deployment. I have been meaning to sit
down and document all the possible combinations. This might be the time
to do that.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message