Thanks for the reply Andre.....

Let me explain you in detail.
Let's suppose we have two applications App1.war and App2.war, deployed in 
webapps of tomcat.
Now I want only App2 to listen additionally on a separate connector port(lets 
suppose 8181)  along with port 8080 to which it is already listen.
But I want App1 to listen only on port 8080 not on port 8181.

So what I did, I create a new service in tomcat with name 'catalina_new' and 
appBase='webapps_new' and I add a connector port 8181 in this.
Now I deploy my App2.war in webapps_new.
So after restart the tomcat, I am able to make App2 to listen on port 8080 as 
well as port 8181(since App2.war is present in both webapps and webapps_new), 
and App1 is listen on only port 8080.
Till now, everything was fine.

Now I do not want to have a separate appBase for service 'catalina_new', means 
I want appBase='webapps' for service 'catalina_new' as well
So by doing this change, my App1 also starts listen on port 8181 which is not 
required.
So what can I do to make only App2 to listen on new port under new service with 
'appBase=webapps' 

Hope you understand my query now!

Thanks



-----Original Message-----
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Thursday, February 07, 2013 7:35 PM
To: Tomcat Users List
Subject: Re: deploy application in new service in tomcat

André Warnier wrote:
> Anil Goyal -X (anigoyal - Aricent Technologies at Cisco) wrote:
>> Hi,
>>
>> I am creating a new service in tomcat (7.0.20) with service name 
>> 'catalina_new' and appBase='webapps' by doing some changes in server.xml.
>> I am keeping the appBase same as that for default service 'catalina'
>> I have several applications deployed under webapps.
>> I want only a single application with context '/feeder' to be 
>> accesible through new service.
>> Condition: I do not want to have a separate appBase for new service 
>> and deployed only the required app under this new appBase.
>>
>> In short, do we have a context based filtering in tomcat so that 
>> tomcat incorporate request only from a specific context path and 
>> ignore all others
>>
> 
> I am not sure if I understand your question correctly, but if I do 
> then there is some kind of contradiction, or impossibility.
> In tomcat (and in the servlet spec in general) a "context" /is/ a web 
> application.
> So if you have a tomcat with an application under 
> CATALINA_BASE/webapps/feeder, and a client asks for the URL 
> http://your_tomcat_host:port/feeder, it will get it.
> If you do not want this application to be accessible, don't deploy it 
> in your host.
> Or use a separate <Host> to give it a separate hostname and/or port 
> and a separate appBase.  That's less complicated than running two 
> separate Tomcat instances.
> 
> 
I know that replying to my own posts is bad form, but I also missed something 
else above.

Why would you want to create a new "Service" in Tomcat, just to deploy an 
additional application ?
I'm not sure exactly what a new "Service"-level item brings here, but surely 
that's not the right level at which to do these things, or ?

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


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

Reply via email to