tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lucas Bee" <l...@email.arizona.edu>
Subject RE: Tomcat - Hibernate
Date Thu, 02 Mar 2006 14:55:05 GMT
Thanks to both who responded to my question.  I will work on creating the
xml fragment and get back with you on the results.  The information you
provided was very helpful and is pointing me in the right direction.

-Lucas 

-----Original Message-----
From: Nikola Milutinovic [mailto:alokin1@yahoo.com] 
Sent: Thursday, March 02, 2006 1:28 AM
To: Tomcat Users List
Subject: Re: Tomcat - Hibernate



--- Giorgio Clavelli <giorgio.clavelli@gmail.com> wrote:

> Hi,
> I'm not an exper at all, but I try to put my 2 cents.
> The fact that your app can connect successfully after the server restart,
> suggests that you should have your app's context.xml (or whatever it is
> called) not in the server.xml but in the correct location inside your app
> directories. I seem to have read, the correct location being under the
> META-INF directory and that Tomcat tries first to look for context in this
> dir and then  use that one under server.xml.
> I hope expert user, will comfirm in one way or the other this
understanding
> of your problem.

As of TC 5.0 the prefered way of configuring a context (web application) is
to
use a XML context fragment file. That file will either be placed in
${CATALINA_HOME}/conf/${HOSTNAME}/${CONTEXT_NAME}.xml, if you're deploying
from
a directory or in ./META-INF/${CONTEXT_NAME}.xml, if it is a WAR file.

That way, deploying of an app can be free from editing the server.xml.

As for the original problem, that is NOT it. The fact that TC's restart
picks
up everything suggests that the config is OK. Or at least relatively OK. I
think that TC will create a XML fragment for the app and it could be that
*that* fragment is interfering with the deployment process.

Since I can see nothing wrong with the config, I would advise the original
poster to go the correct route. Create the config fragment, pack it into
your
WAR, clean up server.xml and try to deploy/undeploy/redeploy. It will have
no
effect on TC 4.x, if you're warried that you might be forced to use it some
day, TC4 ignores that file (one question to the authoritative guys: will
that
dir be accessable? - a potential security hole).

Nix.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@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