tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Case <send_lotsa_spam_h...@yahoo.com>
Subject Re: automatic deployment without server.xml - bad request
Date Wed, 01 Dec 2010 23:34:00 GMT
First of all, thanks for your long answer.



> Please read (carefully), the following  documentation:

Exactly from there I got the approach of "Copy unpacked directory hierarchy...".

> Your docBase would only work if you have a directory 
> $CATALINA_BASE/com.mycompany.myapp.

It works actually, only gives the (expected) warning that it will be ignored. 
But you're right, normally I removed it when switched to context.xml (didn't 
mention in my message as I thought it unimportant)

> 2. remove the path attribute from  your Context
> Rename your WAR file to myapp.war. Tomcat will correctly  infer the path

I'm not using a war but the unpacked approach. Nevertheless, interesting - the 
"automatic deployment" section doesn't mention this inference and I was always 
wondering.

> 3. Place myapp.war in $CATALINA_BASE/webapps
> Tomcat  (by default) will unpack and deploy your application

...and will it compile the JSPs as well? Because that was my original problem...

> 4. Remove the  Manager node from your Context.
> The Manager node relates to managing HTTP  Sessions. The Hibernate sessions 
> relate to Hibernate units of  work.

Yes but the Manager = "" should be used, according to Google, to avoid 
serializing the HTTP sessions - a previously bothering situation. I think I'll 
keep it :)

> 5.  Remove the Resource node from your Context.
> 6. Place the  hibernate.cfg.xml file where it will be packaged in 
> WEB-INF/classes.

Hibernate.cfg.xml is there already... I'll try removing the Resource but I 
remember needing to put it there as well (used in some filters) - I might be 
wrong here.

> 7. Use a ServletContextListener  to get a Hibernate SessionFactory.

I'll try this too.

> that  utility class in a listener. I can then attach logging and MBeans to the 

> listener.

No beans here :)

So, bottom line: great tips thank you! I will try them all. I'm honestly not 
sure whether they relate to my problem, though...

JC



      

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


Mime
View raw message