tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "D'Alessandro, Arthur" <Arthur.D'Alessan...@cbetech.com>
Subject RE: [Possible bug?] Context configurations and .WAR deployment
Date Mon, 11 Oct 2004 18:09:37 GMT
You only need to get rid of the cached version if you made changes to it.

 -----Original Message-----
From: 	raiden@wonko.inow.com [mailto:raiden@wonko.inow.com]
Sent:	Mon Oct 11 14:05:58 2004
To:	Tomcat Users List
Subject:	RE: [Possible bug?] Context configurations and .WAR deployment

Bingo!  That worked.  Thank you!

However, you brought up something that makes a lot more sense to me.  I
always thought it was strange that I had to have a ROOT.xml outside of the
webapp .war file.  It makes a whole lot more sense to me to include
ROOT.xml in the webapp .war file (under META-INF), and to just get rid of
the cached version of ROOT.xml that is generated, when redeploying a new
.war file.

(Though, you would think that Tomcat would get rid of the cached version
on its own.)

I think I'm going to change to that method, so that I can keep everything
in one .war file.

Thank you very much for your help!

-Raiden Johnson


On Mon, 11 Oct 2004, D'Alessandro, Arthur wrote:

> Try changing the docbase from ROOT TO ROOT.war.
>
>  -----Original Message-----
> From: 	raiden@wonko.inow.com [mailto:raiden@wonko.inow.com]
> Sent:	Mon Oct 11 13:39:17 2004
> To:	Tomcat Users List
> Subject:	RE: [Possible bug?] Context configurations and .WAR deployment
>
> Hello,
>
> I will try including what I have in ROOT.xml as context.xml in META-INF,
> and then remove the ROOT.xml each time I remove the webapps/ROOT tree to
> copy in a new ROOT.war into webapps.
>
> However, here is what is in my ROOT.xml right now (that is causing the
> problem of ROOT.war not being expanded when ROOT.xml is updated):
>
> <Context path="" docBase="ROOT" debug="0">
>  <Logger className="org.apache.catalina.logger.FileLogger"
>                  directory="logs"  prefix="localhost_log." suffix=".txt"
>             timestamp="true"/>
>
>   <ResourceParams name="jdbc/DB">
>     <parameter>
>       <name>factory</name>
>       <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>     </parameter>
>     <parameter>
>       <name>maxActive</name>
>       <value>200</value>
>     </parameter>
>     <parameter>
>       <name>maxIdle</name>
>       <value>30</value>
>     </parameter>
>     <parameter>
>       <name>maxWait</name>
>       <value>10000</value>
>     </parameter>
>     <parameter>
>      <name>username</name>
>      <value>test</value>
>     </parameter>
>     <parameter>
>      <name>password</name>
>      <value>testpassword</value>
>     </parameter>
>     <parameter>
>        <name>driverClassName</name>
>        <value>com.mysql.jdbc.Driver</value>
>     </parameter>
>     <parameter>
>       <name>url</name>
>
> <value>jdbc:mysql://10.0.0.1:3306/net_basic?autoReconnect=true</value>
>     </parameter>
>   </ResourceParams>
> </Context>
>
>
> Thank you,
> -Raiden Johnson
>
>
>
> On Sat, 9 Oct 2004, D'Alessandro, Arthur wrote:
>
> > A suggestion, include the ROOT.xml as context.xml under META-INF, tomcat
> > will create it under your host as ROOT.xml when it is deployed.  That
> > doesn't solve the problem your experiencing, what does your ROOT.xml
> > look like? What are you referencing your docBase? Ours word fine by
> > referencing the ROOT.war.
> >
> > Note, if you update the context.xml in your webapp, it doesn't auto
> > update the cached ROOT.xml; you would need to undeploy the webapp,
> > delete the ROOT.xml from conf/Catalina/localhost  and redeploy the new
> > webapp.
> >
> > -----Original Message-----
> > From: raiden@wonko.inow.com [mailto:raiden@wonko.inow.com]
> > Sent: Saturday, October 09, 2004 3:33 AM
> > To: tomcat-user@jakarta.apache.org
> > Subject: [Possible bug?] Context configurations and .WAR deployment
> >
> > Hello,
> >
> > I recently upgraded from Tomcat 5.0.19 to Tomcat 5.0.28.
> >
> > I am now running into a conflict between ROOT.xml and ROOT.war.
> >
> > This happens when I deploy to production:
> > 1. I delete the ROOT.war and ROOT directory from
> > /usr/local/tomcat/webapps
> > 2. I delete the ROOT.xml context configuration file in
> > /usr/local/tomcat/conf/Catalina/localhost
> > 3. I then copy the new ROOT.war file to /usr/local/tomcat/webapps
> > 4. I copy the new ROOT.xml file to
> > /usr/local/tomcat/conf/Catalina/localhost
> >
> > This used to work fine in Tomcat 5.0.19.  Now, in 5.0.28, when I startup
> > the server, I get the following error:
> >
> > INFO: Missing application web.xml, using defaults only
> > StandardEngine[Catalina].StandardHost[localhost].StandardContext[]
> >
> > And the new ROOT.war file is never expanded (which is why ROOT.xml can't
> > find web.xml).
> >
> > The only way to get the .war file to expand, is to temporarily remove
> > the
> > ROOT.xml file, startup the server (which then expands the .war file),
> > and
> > then copy the ROOT.xml file over.
> >
> > The reason I'm using the ROOT.xml file is to setup DBCP for this webapp
> > only.  In theory, it's not updated often, but when updates occur, it
> > would be copied over during this process, which is why I do it in my
> > deployment script.
> >
> > What happened since Tomcat 5.0.19 to make it not expand the ROOT.war
> > archive at the same time that it's processing a new ROOT.xml file?
> >
> > Thank you,
> > -Raiden Johnson
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message