tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emerson Cargnin <>
Subject Re: server.xml (with mod_jk configuration) being rewritten
Date Fri, 16 May 2003 19:41:31 GMT
Thanks for your response jacob.

I'm posting both server.xml's before and post rewriting.  server.xml is 
the rewritten, and GOOD is the right one :)

About the defeats of using Apache : I don't want that the users to use 
port 8080 to access tomcat app's directly, i thought that this would be 
the objective of the mod_jk.

Ii will use deploy task. so the next time i start tomcat it deploys my 
app, in the script I copy my GOOD version of server.xml int 
he place of the rewritten server.xml. so far so good. But i just found a 
very big problem : tomcat doesn't regenerates the mod_jk.conf when I 
deploy a new app, it should have a tomcat ant task to make it rewrite 
the mod_jk.conf.
Besides that, apache doenst' rereads the mod_jk.conf when it changes, so 
thats' no use for "hot-deploy" if I use redirection by apache, i do must 
restart both :(

any comments?????

Jacob Kjome wrote:

> The ant "deploy" task definitely will cause Tomcat to rewrite the 
> server.xml. This is to persist the information about the context so it 
> can serve it up after a restart.  However, the server.xml rewrite 
> shouldn't remove data (other than comments) from the server.xml.  What 
> it does seem to do is write each element with every possible 
> attribute, but that isn't a big deal.  If some of your non-commented 
> elements in server.xml are being removed upon server.xml rewrite, then 
> you should report this as a bug to .
> BTW, using Apache with a context deployed via the ant manager "deploy" 
> task kind of defeats the purpose of using Apache.  Usually, the idea 
> is to let Apache serve static content to take the burden off of Tomcat 
> so it can peacefully serve dynamic content.  However, since context's 
> deployed via the ant manager "deploy" task are served directly from 
> the .war file, there is no static content for Apache to serve since 
> Apache requires the context to be in a directory, not in a .war file.
> You might want to use the ant manager "install" task instead of the 
> "deploy" task.  The server.xml will not be rewritten.  However, upon 
> each restart of Tomcat, you will have to do the install again because 
> it is not persisted across restarts.
> Jake
> At 08:25 PM 5/15/2003 -0300, you wrote:
>> please, anyone could answer me? i'm without clues. I have to use 
>> auto-conf of apache and remote deploy of tomcat. but remote-deploy 
>> changes the server.xml, loosing the configuration of mod_jk (it 
>> rewrites the server.xml), so the next time i startup apache and/or 
>> tomcat, it will not get the configuration of mod_jk. Any clue???????????
>> thanks in advance
>> Emerson
>> Emerson Cargnin wrote:
>>> when I deploy a new app into tomcat, my server.xml (with mod_jk 
>>> configuration) is being rewritten, so the next time I restart apache 
>>> and Tomcat it does not take in account my configuration. I need to 
>>> change the  server.xml in evert apache and tomcat restart? And the 
>>> contexts created dnamically through deploy ant taks?
>>> I need to solve this because feature  ( automatically deploy  4.1) 
>>> was the reason to use auto-conf of apache-tomcat.
>> -- 
>> Emerson Cargnin
>> Analista de Sitemas
>> Setor de Desenvolvimento de Sistemas - TRE-SC
>> tel : (048) - 251-3700 - Ramal 3181
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:

Emerson Cargnin
Analista de Sitemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181

View raw message