You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ki...@wipro.com on 2007/07/20 17:23:38 UTC

Accessing an application with different paths

Hi,

 

We have a scenario for High Availability setup (using tomcat 5.5.9);

 

The application 'app' is deployed on two machines (recognized as 'app1'
on one machine, and 'app2' in another) to handle failover. We have
enabled tomcat cluster to have the session replicated between two
instances. MOD_JK connector is used for load balancing. When the
application is accessed using the path "web_ip_address/app" the request
is process by either 'app1' or 'app2' instance. 

 

The context is defined as 'app1', where as the war file is named as
'app' and the war is placed in "tomcat/webapps/'. This leads to
application being initialized twice. The context path is required to be
"/app1", because we need to perform application specific activities
(start/stop engines) only on one machine, if required.

 

We tried to move the application to any location other than
"tomcat/webapps", and included a Context file,
"tomcat/conf/[engine-name]/[host-name]/app1.xml". This way individual
applications are accessible, however the path "web_ip_address/app" fails
with "Page cannot be displayed" error.

 

Is there a way to access an application deployed in tomcat using two
different paths?

 

Thank you in advance for the support.

 

Regards,

Kiran Tadepalli.

 




The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
 
www.wipro.com

RE: Accessing an application with different paths

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: David kerber [mailto:dckerber@verizon.net] 
> Subject: Re: Accessing an application with different paths
> 
> I sure wish you had been answering questions when I was 
> setting this up 4 or 5 years ago!!

Might not have worked this way back then.  This capability came in at
some point in the 5.0 development.

 - 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: Accessing an application with different paths

Posted by David kerber <dc...@verizon.net>.
I sure wish you had been answering questions when I was setting this up 
4 or 5 years ago!!

D


Caldarale, Charles R wrote:
>> From: David kerber [mailto:dckerber@verizon.net] 
>> Subject: Re: Accessing an application with different paths
>>
>> But then they both need their own copy of the war
>>     
>
> Not true; the docBase attributes in the two (or more) <Context> elements
> can be identical.
>
>   
>> I never figured out how to get these to work with
>> a name that looked like a sub-directory, so that
>> it was accessed like: 
>> http://www.myhost.com:81/wra/customername/Login.jsp
>>     
>
> Put the <Context> element in a file named
> conf/Catalina/[host]/wra#customername.xml.
>
>  - Chuck
>   



---------------------------------------------------------------------
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: Accessing an application with different paths

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: David kerber [mailto:dckerber@verizon.net] 
> Subject: Re: Accessing an application with different paths
> 
> But then they both need their own copy of the war

Not true; the docBase attributes in the two (or more) <Context> elements
can be identical.

> I never figured out how to get these to work with
> a name that looked like a sub-directory, so that
> it was accessed like: 
> http://www.myhost.com:81/wra/customername/Login.jsp

Put the <Context> element in a file named
conf/Catalina/[host]/wra#customername.xml.

 - 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: Accessing an application with different paths

Posted by David kerber <dc...@verizon.net>.
But then they both need their own copy of the war, and I never figured 
out how to get these to work  with a name that looked like a 
sub-directory, so that it was accessed like:

http://www.myhost.com:81/wra/customername/Login.jsp

It works fine if I only have a one-level context path, but I never got 
it to work with the two-level version without putting it in server.xml.

Dave


Caldarale, Charles R wrote:
>> From: David kerber [mailto:dckerber@verizon.net] 
>> Subject: Re: Accessing an application with different paths
>>
>> I've done this by specifying both applications' context paths in the 
>> server.xml, along with the appropriate docbase entries.
>>     
>
> Please don't do that - put them in conf/Catalina/[host]/[appname].xml,
> where they belong.
>
>  - 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
>
>
>
>   



---------------------------------------------------------------------
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: Accessing an application with different paths

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: David kerber [mailto:dckerber@verizon.net] 
> Subject: Re: Accessing an application with different paths
> 
> I've done this by specifying both applications' context paths in the 
> server.xml, along with the appropriate docbase entries.

Please don't do that - put them in conf/Catalina/[host]/[appname].xml,
where they belong.

 - 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: Accessing an application with different paths

Posted by David kerber <dc...@verizon.net>.
I've done this by specifying both applications' context paths in the 
server.xml, along with the appropriate docbase entries.

kiran.tadepalli@wipro.com wrote:
> Hi,
>
>  
>
> We have a scenario for High Availability setup (using tomcat 5.5.9);
>
>  
>
> The application 'app' is deployed on two machines (recognized as 'app1'
> on one machine, and 'app2' in another) to handle failover. We have
> enabled tomcat cluster to have the session replicated between two
> instances. MOD_JK connector is used for load balancing. When the
> application is accessed using the path "web_ip_address/app" the request
> is process by either 'app1' or 'app2' instance. 
>
>  
>
> The context is defined as 'app1', where as the war file is named as
> 'app' and the war is placed in "tomcat/webapps/'. This leads to
> application being initialized twice. The context path is required to be
> "/app1", because we need to perform application specific activities
> (start/stop engines) only on one machine, if required.
>
>  
>
> We tried to move the application to any location other than
> "tomcat/webapps", and included a Context file,
> "tomcat/conf/[engine-name]/[host-name]/app1.xml". This way individual
> applications are accessible, however the path "web_ip_address/app" fails
> with "Page cannot be displayed" error.
>
>  
>
> Is there a way to access an application deployed in tomcat using two
> different paths?
>
>  
>
> Thank you in advance for the support.
>
>  
>
> Regards,
>
> Kiran Tadepalli.
>
>  
>
>
>
>
> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 
>
> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
>  
> www.wipro.com
>   



---------------------------------------------------------------------
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