You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by tomcatastrophe <na...@changethings.org> on 2009/06/25 08:29:07 UTC

Tomcat WAR deployment with virtual host only shows blank page

So, here is my configuration and what I am trying to accomplish:

I have 1 host definition (aside from the default localhost) in my
server.xml:
<Host name="www.foo.com" appBase="foocom" autoDeploy="true"
unpackWARs="true">
    <Alias>foocom</Alias>
</Host>

I have /work/tomcat as my home folder for Tomcat.

Inside of /work/tomcat I have foocom (/work/tomcat/foocom)

Inside of /work/tomcat/foocom is ROOT.war

ROOT.war contains:

index.html
WEB-INF
WEB-INF/web.xml
WEB-INF/lib
WEB-INF/classes
META-INF
META-INF/context.xml

The contents of context.xml are:
(removed XML DTD data and comments for readability, but it is standard)
<Context antiResourceLocking="false" privileged="true" />

When I start up Tomcat and try to access http://www.foo.com:8080 (foo.com is
set in my host file to 127.0.0.1) I only see a blank white page.

If I rename the ROOT.war to ROOT it starts up fine. Does it matter if the
.war file is packed or unpacked and just named .WAR?

In /work/tomcat/conf/Catalina it creates foo.com with a ROOT.war.xml file
inside.

So, it looks in META-INF and finds and copies the context.xml to the
conf/Catalina/foo.com folder, but it still just serves a white page.

Thanks!!!
-- 
View this message in context: http://www.nabble.com/Tomcat-WAR-deployment-with-virtual-host-only-shows-blank-page-tp24197704p24197704.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


RE: Tomcat WAR deployment with virtual host only shows blank page

Posted by tomcatastrophe <na...@changethings.org>.
Ok, it works that way. So, if I did want to create the WAR file, is my
structure correct to work with a virtual host?

Caldarale, Charles R wrote:
> 
>> From: tomcatastrophe [mailto:nabble@changethings.org]
>> Subject: RE: Tomcat WAR deployment with virtual host only shows blank
>> page
>> 
>> So, I should package my WAR then?
> 
> Not necessarily; you can deploy it expanded, but with the directory name
> ROOT, not ROOT.war.
> 
>  - 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Tomcat-WAR-deployment-with-virtual-host-only-shows-blank-page-tp24197704p24249236.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


RE: Tomcat WAR deployment with virtual host only shows blank page

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: tomcatastrophe [mailto:nabble@changethings.org]
> Subject: RE: Tomcat WAR deployment with virtual host only shows blank
> page
> 
> So, I should package my WAR then?

Not necessarily; you can deploy it expanded, but with the directory name ROOT, not ROOT.war.

 - 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: Tomcat WAR deployment with virtual host only shows blank page

Posted by tomcatastrophe <na...@changethings.org>.
Thanks Chuck. So, I should package my WAR then?


Caldarale, Charles R wrote:
> 
>> From: tomcatastrophe [mailto:nabble@changethings.org]
>> Subject: RE: Tomcat WAR deployment with virtual host only shows blank
>> page
>> 
>> Yes, it is a directory. What is odd is that it copies the
>> META-INF/context.xml to the /tomcat/conf/Catalina/foo.com folder...
> 
> Not something to be counted on.
> 
>> This works fine on JBoss, I can deploy a foo.war that is actually a
>> directory and JBoss (which uses Tomcat) has no problem doing this.
> 
> The deployment mechanism in JBoss is completely different; don't assume
> that just because Tomcat is embedded in JBoss that they work in a similar
> way.
> 
>  - 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Tomcat-WAR-deployment-with-virtual-host-only-shows-blank-page-tp24197704p24202849.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


RE: Tomcat WAR deployment with virtual host only shows blank page

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: tomcatastrophe [mailto:nabble@changethings.org]
> Subject: RE: Tomcat WAR deployment with virtual host only shows blank
> page
> 
> Yes, it is a directory. What is odd is that it copies the
> META-INF/context.xml to the /tomcat/conf/Catalina/foo.com folder...

Not something to be counted on.

> This works fine on JBoss, I can deploy a foo.war that is actually a
> directory and JBoss (which uses Tomcat) has no problem doing this.

The deployment mechanism in JBoss is completely different; don't assume that just because Tomcat is embedded in JBoss that they work in a similar way.

 - 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: Tomcat WAR deployment with virtual host only shows blank page

Posted by tomcatastrophe <na...@changethings.org>.
Yes, it is a directory. What is odd is that it copies the
META-INF/context.xml to the /tomcat/conf/Catalina/foo.com folder...

This works fine on JBoss, I can deploy a foo.war that is actually a
directory and JBoss (which uses Tomcat) has no problem doing this.


Caldarale, Charles R wrote:
> 
>> From: tomcatastrophe [mailto:nabble@changethings.org]
>> Subject: Tomcat WAR deployment with virtual host only shows blank page
>> 
>> If I rename the ROOT.war to ROOT it starts up fine. Does it matter if
>> the .war file is packed or unpacked and just named .WAR?
> 
> Are you saying that ROOT.war is really a directory?  If so, Tomcat will
> ignore it (or get very confused - doesn't matter, since such a directory
> name is illegal).  The default webapp must either be in a directory named
> ROOT, or in a war file named ROOT.war; those are your only choices.
> 
>  - 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Tomcat-WAR-deployment-with-virtual-host-only-shows-blank-page-tp24197704p24202534.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


RE: Tomcat WAR deployment with virtual host only shows blank page

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: tomcatastrophe [mailto:nabble@changethings.org]
> Subject: Tomcat WAR deployment with virtual host only shows blank page
> 
> If I rename the ROOT.war to ROOT it starts up fine. Does it matter if
> the .war file is packed or unpacked and just named .WAR?

Are you saying that ROOT.war is really a directory?  If so, Tomcat will ignore it (or get very confused - doesn't matter, since such a directory name is illegal).  The default webapp must either be in a directory named ROOT, or in a war file named ROOT.war; those are your only choices.

 - 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