You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Matthias Pueski <ma...@pueski.de> on 2009/11/18 09:09:32 UTC

Virtual hosts on tomcat > 5.5.15

Hi everybody,

currently I am running a few virtual domains on a root server with
tomcat 5.5.15 installed. So far everything works fine.

Now I just wanted to upgrade to the latest 5.5.x series in fact migrate
to version 5.5.28.

For example a virtual host on tomcat 5.5.15 has been configured as
follows:

<Host name="www.blah.de" debug="0" unpackWARs="true"
appBase="/home/blah">
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs"  prefix="virtual_log." suffix=".txt" timestamp="true"/>
<Context path="" docBase="" debug="0" reloadable="true"/>
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs"  prefix="virtual_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
</Host>

Works fine without any problems.

If I switch now to Tomcat 5.5.28 the context is beeing deployed and the
JSP pages are accessible, but the whole WEB-INF folder including web.xml
and taglibs cannot be found.

I've noticed this behaviour with all tomcat versions later than 5.5.15.
Does anybody know if some configuration ore something else has changed?

Unfortunately I could not find any changelog or any other information
about this issue.

Does anybody have an idea, what's going wrong?

Any suggestions are really appreciated.

Cheers
Matthias 



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


RE: Virtual hosts on tomcat > 5.5.15

Posted by Matthias Pueski <ma...@pueski.de>.
Thank you both very much!

I did the following:

1.) Removed the context element from the server.xml
2.) added META-INF/context.xml to the web application and removed the
docBase attribute
3.) Removed the logger element
4.) moved the Web Application to a folder named ROOT, directly under the
appBase

Now everything works fine.


Am Mittwoch, den 18.11.2009, 08:18 -0600 schrieb Caldarale, Charles R:
> > From: Matthias Pueski [mailto:matthias@pueski.de]
> > Subject: Virtual hosts on tomcat > 5.5.15
> > 
> > <Host name="www.blah.de" debug="0" unpackWARs="true"
> > appBase="/home/blah">
> > <Logger className="org.apache.catalina.logger.FileLogger"
> > directory="logs"  prefix="virtual_log." suffix=".txt"
> > timestamp="true"/>
> 
> There is no <Logger> element allowed in 5.5.
> 
> > <Context path="" docBase="" debug="0" reloadable="true"/>
> 
> As Pid noted, an empty docBase is illegal.  Also, you should not be placing <Context> elements in server.xml.  If you want to define the default webapp for a <Host>, name the .war file or directory ROOT (case sensitive), located immediately under the <Host> appBase directory.  The <Context> element belongs in the webapp's META-INF/context.xml file, or in conf/Catalina/[host]/[appName].xml.
> 
> The fact that anything "worked" under 5.5.15 is purely accidental, since your config is seriously broken.  It appears to have been copied verbatim from a much older version of Tomcat (or perhaps derived from the tons of misinformation about Tomcat out on the Internet), which is always bad practice.
> 
>  - 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 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


RE: Virtual hosts on tomcat > 5.5.15

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Matthias Pueski [mailto:matthias@pueski.de]
> Subject: Virtual hosts on tomcat > 5.5.15
> 
> <Host name="www.blah.de" debug="0" unpackWARs="true"
> appBase="/home/blah">
> <Logger className="org.apache.catalina.logger.FileLogger"
> directory="logs"  prefix="virtual_log." suffix=".txt"
> timestamp="true"/>

There is no <Logger> element allowed in 5.5.

> <Context path="" docBase="" debug="0" reloadable="true"/>

As Pid noted, an empty docBase is illegal.  Also, you should not be placing <Context> elements in server.xml.  If you want to define the default webapp for a <Host>, name the .war file or directory ROOT (case sensitive), located immediately under the <Host> appBase directory.  The <Context> element belongs in the webapp's META-INF/context.xml file, or in conf/Catalina/[host]/[appName].xml.

The fact that anything "worked" under 5.5.15 is purely accidental, since your config is seriously broken.  It appears to have been copied verbatim from a much older version of Tomcat (or perhaps derived from the tons of misinformation about Tomcat out on the Internet), which is always bad practice.

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


Re: Virtual hosts on tomcat > 5.5.15

Posted by Pid <pi...@pidster.com>.
On 18/11/2009 08:09, Matthias Pueski wrote:
> Hi everybody,
>
> currently I am running a few virtual domains on a root server with
> tomcat 5.5.15 installed. So far everything works fine.
>
> Now I just wanted to upgrade to the latest 5.5.x series in fact migrate
> to version 5.5.28.
>
> For example a virtual host on tomcat 5.5.15 has been configured as
> follows:
>
> <Host name="www.blah.de" debug="0" unpackWARs="true"
> appBase="/home/blah">
> <Logger className="org.apache.catalina.logger.FileLogger"
> directory="logs"  prefix="virtual_log." suffix=".txt" timestamp="true"/>

> <Context path="" docBase="" debug="0" reloadable="true"/>

That'll cause you some problems.
Do you have a META-INF/context.xml defined in your web app?

Have a read of the docs about how to properly define a Context and give 
us a shout if you can't fix it.

N.B. You'll probably have to rename the app "ROOT.war" or the exploded 
app dir "ROOT".

  http://tomcat.apache.org/tomcat-5.5-doc/config/context.html


p



> <Valve className="org.apache.catalina.valves.AccessLogValve"
> directory="logs"  prefix="virtual_log." suffix=".txt"
> pattern="common" resolveHosts="false"/>
> </Host>
>
> Works fine without any problems.
>
> If I switch now to Tomcat 5.5.28 the context is beeing deployed and the
> JSP pages are accessible, but the whole WEB-INF folder including web.xml
> and taglibs cannot be found.
>
> I've noticed this behaviour with all tomcat versions later than 5.5.15.
> Does anybody know if some configuration ore something else has changed?
>
> Unfortunately I could not find any changelog or any other information
> about this issue.
>
> Does anybody have an idea, what's going wrong?
>
> Any suggestions are really appreciated.
>
> Cheers
> Matthias
>
>
>
> ---------------------------------------------------------------------
> 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