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]

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to