• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem deploying WAR file with a context.xml

 
Garry Mc Hugh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I use Tomcat 5.0.27 on a XP station.

I have a problem deploying a war file.

Manipulation:
1. I copy my VpmUpdate.war file to /Tomcat 5.0/webapps
2. I start tomcat with the option "Auto Deploy=True" and "Deploy On Startup=True".


The war file is well extracted, but when tomcat try to create the file conf\Catalina\localhost\VpmUpdate.xml with the /META-INF/context.xml from the WAR file, he created a directory instead of a file with the name "VpmUpdate.xml".

I not sure but I think this is a setting from the tomcat admin... could someone help with this.


This is my context.xml:

<?xml version='1.0' encoding='utf-8'?>
<Context displayName="VPM Update" path="/VpmUpdate" docBase="VpmUpdate">
<ResourceLink global="UserDatabase" name="Users" type="org.apache.catalina.UserDatabase"/>
<ResourceLink global="jdbc/VpmUpdate" name="jdbc/VpmUpdate" type="Data Sources"/>
</Context>


Thank you,
-Garry Mc Hugh
 
Ray Stojonic
Ranch Hand
Posts: 326
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat will create a directory for the context in CATALINA_HOME/webapps and a context file for the context in CATALINA_HOME/conf/Catalina/localhost.

Unless you're saying Tomcat created a directory in the conf path, it sounds like its working as expected.
 
Garry Mc Hugh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep, Tomcat created a directory in the conf path with the name "VpmUpdate.xml" when I use the auto deploy on startup.

But, if I use the Deploy option in the Application Manager, my context file is well created in the folder CATALINA_HOME/conf/Catalina/localhost.

If my context file is already there and I redeploy my war file with the auto deploy on startup, Tomcat did not create a directory like at the first installation but he update the context file like he suppose to.

Bizzare!!!
g
 
Ray Stojonic
Ranch Hand
Posts: 326
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm, that is odd...

in conf/server.xml what is the appBase set to in the localhost Host tag?
 
Garry Mc Hugh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The value of appBase is "webapps".

-------------------------------------------------------------------
This is the snapshot of my server.xml:

<Service name="Catalina">
<Connector acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" port="8080" redirectPort="8443" maxSpareThreads="75" maxThreads="150" minSpareThreads="25">
</Connector>
<Connector port="8009" protocol="AJP/1.3" protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" redirectPort="8443">
</Connector>
<Engine defaultHost="localhost" name="Catalina">
<Host appBase="webapps" name="localhost">
<Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_log." suffix=".txt" timestamp="true"/>
</Host>
<Logger className="org.apache.catalina.logger.FileLogger" prefix="catalina_log." suffix=".txt" timestamp="true"/>
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
</Engine>
</Service>
-------------------------------------------------------------------

Thank you Ray to take the time to answer me.
g
 
Garry Mc Hugh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I upgrade to Tomcat ver 5.0.28 and I don't have the problem any more.
It's a bug in the version 5.0.27.
g
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic