tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Eriksson" <Dan.Eriks...@springmobil.se>
Subject RE: [SOLVED] tomcat not able to connect to postgresql?
Date Fri, 11 Apr 2008 14:57:22 GMT
Hi Chuck,
Thanks for the input!

I changed the appBase="webapps" and docBase="myapp".

Not sure about the context yet though, as I want to be able to use the
same parameters for some other applications and not be dependent on the
developers to do configuration changes as we use war files to pack the
applications.
I guess there are other alternatives as well to accomplish this, and I
will look at it when I have more time :)

Best regards,
Dan


-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com] 
Sent: Thursday, April 10, 2008 3:30 PM
To: Tomcat Users List
Subject: RE: [SOLVED] tomcat not able to connect to postgresql?

> From: Dan Eriksson [mailto:Dan.Eriksson@springmobil.se] 
> Subject: [SOLVED] tomcat not able to connect to postgresql?
> 
>       <Host name="myapp.mydomain.com" appBase="webapps/myapp"
>         unpackWARs="true" autoDeploy="true"
>         xmlValidation="false" xmlNamespaceAware="false">
>         <Context path="" docBase="" debug="0" reloadable="true">

You may have fixed your DB access issue, but the above config contains a
serious problem that will likely bite you in the future.  A docBase
attribute (explicit or implicit) must never be empty; in your case it's
the same as the <Host> appBase, which creates serious internal grief for
Tomcat.  The proper setting would be appBase="webapps" and
docBase="myapp".

The above also places the <Context> element in server.xml, which has
been strongly discouraged for several years, and shouldn't be used by
any current implementation.  Since you apparently want this webapp to be
the default one, it should be located in webapps/ROOT, not
webapps/myapp, and the <Context> element should be in
webapps/ROOT/META-INF/context.xml, without the path and docBase
attributes.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message