[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Tomcat virtual server addition

Posted on 2004-10-28
3
Medium Priority
?
466 Views
Last Modified: 2010-03-17
Hi

I have Tomcat v5 installed running on port 80 which is my production version.  I wanted to run another version of tomcat on port 8080 for a development version of my code on the same box.

How can I create a virtual server to accomplish this?
0
Comment
Question by:fareedakhan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 19

Accepted Solution

by:
ramazanyich earned 450 total points
ID: 12467406
add following line into your server.xml just after <Connector port="80"...../> element:
    <Connector port="8080"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               debug="0" connectionTimeout="20000"
               disableUploadTimeout="true" />

Your server will listen then in ports 80 and 8080
0
 

Author Comment

by:fareedakhan
ID: 12467490
Thanks!

How can I direct the different ports to different webapp folders?
0
 
LVL 19

Expert Comment

by:ramazanyich
ID: 12468019
Ok. Now it is more clear.
So you have following config for a moment (I show only part which is important):
<Server .....>
..
    <Service name="Catalina">
    <Connector port="80"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               debug="0" connectionTimeout="20000"
               disableUploadTimeout="true" />
    <Engine name="Catalina" defaultHost="localhost" debug="0">
     ....
      <Host name="localhost" debug="0" appBase="webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">
        ....
        </Host>
     </Engine>
    </Service>
</Server>

It means that you have a Service which has connector on port 80 and invokes applications for host with appbase on webapps dir.

If you want to have another listener for another appBase directory you should copy element (and subelements) <Service> and change port number of conenctor, name of service and appBase for <Host> element. Example:

   <Service name="Catalinadev">
    <Connector port="8080"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               debug="0" connectionTimeout="20000"
               disableUploadTimeout="true" />
    <Engine name="Catalinadev" defaultHost="localhost" debug="0">
     ....
      <Host name="localhost" debug="0" appBase="webappsdev"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">
        ....
        </Host>
     </Engine>
    </Service>

In that eample appBase will be webappsdev.

 
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Convert websphere application server default chained Certificates from 1024 to 2048 keysize or higher size and also you can change signatureAlgorithm . Please make sure Websphere Application Server fixpack 7.0.0.23 or Above. The following steps a…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question