port-offset

2014-02-25 Thread Ja kub
Hi

Do you know if in Tomcat is something similar to jboss port-offset ?

-Djboss.socket.binding.port-offset=100

It would be convinient for starting several tomcats on the same operating
system. No need to change ports in server.xml

BR
Jakub


Re: port-offset

2014-02-25 Thread Konstantin Kolinko
2014-02-25 16:55 GMT+04:00 Ja kub jjaku...@gmail.com:
 Hi

 Do you know if in Tomcat is something similar to jboss port-offset ?

 -Djboss.socket.binding.port-offset=100

 It would be convinient for starting several tomcats on the same operating
 system. No need to change ports in server.xml

Tomcat configuration files support ${property} substitutions.
How to define a port number property is up to you.

http://tomcat.apache.org/tomcat-7.0-doc/config/index.html

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



Re: Is it possible to start multiple tomcat servers with port-offset mechanism

2012-02-16 Thread Konstantin Kolinko
2012/2/16 Pradeep Fernando pradee...@gmail.com:
 I want to start multiple tomcat server instances by giving a port
 offset kind of parameter. I dont want to hard code the port. A
 port.offset system property would be ideal.

 say my default port is 8080. with port.offset param  set to  '1'. it
 would be 8081.

 8080 + ${port.offset}

 Is there any mechanism to fulfill my requirement. ?

You can use properties substritution.
E.g.  create $CATALINA_BASE/bin/setenv.sh:
[[[
JAVA_OPTS=-Dmyportnumber=8083
]]]
and use port=${myportnumber} in server.xml

It is up to you how to calculate the port number.

Best regards,
Konstantin Kolinko

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



Re: Is it possible to start multiple tomcat servers with port-offset mechanism

2012-02-16 Thread Pid
On 16/02/2012 11:34, Konstantin Kolinko wrote:
 2012/2/16 Pradeep Fernando pradee...@gmail.com:
 I want to start multiple tomcat server instances by giving a port
 offset kind of parameter. I dont want to hard code the port. A
 port.offset system property would be ideal.

 say my default port is 8080. with port.offset param  set to  '1'. it
 would be 8081.

 8080 + ${port.offset}

 Is there any mechanism to fulfill my requirement. ?
 
 You can use properties substritution.
 E.g.  create $CATALINA_BASE/bin/setenv.sh:
 [[[
 JAVA_OPTS=-Dmyportnumber=8083
 ]]]
 and use port=${myportnumber} in server.xml
 
 It is up to you how to calculate the port number.

+1  If you're generating an offset, why not just calculate the actual
port number?


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature