You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rob Tanner <rt...@linfield.edu> on 2007/10/23 20:39:47 UTC

sun-web.xml file in Tomcat

Hi,

I need to make my applications function in both Tomcat and Glassfish.  
In Tomcat the context root is simply the path in the context declaration 
in server.xml.  In Glassfish, the default is the application name.  In 
order to get Glassfish to assign the correct context root I have 
included a file called sun-web.xml in WEB-INF along with the standard 
web.xml.  My question is: will this file which Tomcat doesn't know 
anything about cause any problems with Tomcat or will Tomcat simply 
ignore it?

Thanks,
Rob




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


RE: sun-web.xml file in Tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Rob Tanner [mailto:rtanner@linfield.edu] 
> Subject: Re: sun-web.xml file in Tomcat
> 
> In Tomcat the context root is simply the path in the 
> context declaration in server.xml.

You should not have any <Context> declarations in server.xml; that
capability is there only for compatibility with older levels.  If you
put the <Context> element where it belongs (META-INF/context.xml), then
Tomcat also uses the name of the app as the path (the path attribute is
not allowed in this case).  Take a look at the doc:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

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


Re: sun-web.xml file in Tomcat

Posted by Rob Tanner <rt...@linfield.edu>.
Thanks!!

Christopher Schultz said the following on 10/23/2007 11:59 AM:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Rob,
>
> Rob Tanner wrote:
>   
>> I need to make my applications function in both Tomcat and Glassfish. 
>> In Tomcat the context root is simply the path in the context declaration
>> in server.xml.  In Glassfish, the default is the application name.  In
>> order to get Glassfish to assign the correct context root I have
>> included a file called sun-web.xml in WEB-INF along with the standard
>> web.xml.  My question is: will this file which Tomcat doesn't know
>> anything about cause any problems with Tomcat or will Tomcat simply
>> ignore it?
>>     
>
> Tomcat should ignore this file. I'm guessing that the Glassfish and
> Tomcat devs both know about each others' app-server-specific config
> files, and try not to step on each others' toes.
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHHkSi9CaO5/Lv0PARAhhcAKCAlL60hdMi4qbZ/hQxdOE3JPk3vwCfR+q7
> 5uoDWxgHrzKV3bDZ40j9szk=
> =gC/3
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>   


Re: sun-web.xml file in Tomcat

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rob,

Rob Tanner wrote:
> I need to make my applications function in both Tomcat and Glassfish. 
> In Tomcat the context root is simply the path in the context declaration
> in server.xml.  In Glassfish, the default is the application name.  In
> order to get Glassfish to assign the correct context root I have
> included a file called sun-web.xml in WEB-INF along with the standard
> web.xml.  My question is: will this file which Tomcat doesn't know
> anything about cause any problems with Tomcat or will Tomcat simply
> ignore it?

Tomcat should ignore this file. I'm guessing that the Glassfish and
Tomcat devs both know about each others' app-server-specific config
files, and try not to step on each others' toes.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHHkSi9CaO5/Lv0PARAhhcAKCAlL60hdMi4qbZ/hQxdOE3JPk3vwCfR+q7
5uoDWxgHrzKV3bDZ40j9szk=
=gC/3
-----END PGP SIGNATURE-----

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