-1

Can a single instance of tomcat run on two different ports. For example say I have one and only one tomcat running, then can I type localhost:8080 & localhost:8181 in browser & got it working?

If yes, please let me know the procedure.

Dave Newton
  • 158,873
  • 26
  • 254
  • 302
waprau
  • 177
  • 6
  • 16

2 Answers2

0

A better solution would be an additional webserver like an apache which redirects to the tomcat server.

Lukas Eichler
  • 5,689
  • 1
  • 24
  • 43
0

You can edit your server.xml to create additional connector elements:

<Connector port="8081"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
debug="0" connectionTimeout="20000"
disableUploadTimeout="true" />

For example.

I might be inclined to address this via NAT or a load balancer however.

Jamie
  • 611
  • 1
  • 5
  • 20