tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: URL based redirection working partially with Apache tomcat
Date Thu, 03 Dec 2015 17:37:12 GMT
To whom it may concern,

On 12/3/15 10:54 AM, Kernel freak wrote:
> Hello friends,
> 
> I would like to deploy multiple webapps(as of now 2,waiting for domain name
> for 3rd) on a single Apache Tomcat instance. I have been partially
> successful as one URL is working properly, other is not.
> 
> Situation :
> 1) I have created two folders called domain1_webapps  and domain2_webapps
> and put the respective webapps named ROOT.war in each of them.
> 2) Then I configured server.xml as mentioned below.
> 
> 
>  <Host name="localhost"  appBase="webapps" unpackWARs="true"
> autoDeploy="true"/>
>         <Host name="www.domain-one.com" autoDeploy="true" unpackWARs="true"
> appBase="domain1_webapps"/>
>         <Host name="www.domain-two.com" autoDeploy="true" unpackWARs="true"
> appBase="domain2_webapps"/>
> 
> Right now when I call www.domain-one.com( not domain-one.com), I get the
> correct site. But for the 2nd one, I have to call
> www.domain-two.com/app_name.
> 
> *How can I remove in 2nd domain the app_name context-path which is getting
> appended. Kindly let me know. *
> 
> The ironical situation is I have not kept the app_name anywhere, guess
> Tomcat must be retrieving it from POM.xml.
> 
> Reference question on SO :
> http://stackoverflow.com/questions/34069289/apache-tomcat-url-based-redirection-partially-works

Have you read the documentation for how to deploy a web application in
Tomcat?

http://tomcat.apache.org/tomcat-8.0-doc/config/context.html#Defining_a_context

-chris

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


Mime
View raw message