This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Micro Frontends in Action and have Michael Geers on-line!
See this thread for details.
Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to setup two tomcats in eclipse indigo ?

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have one jsp file i want it to run on two different tomcats. Is it possible ?
 
Saloon Keeper
Posts: 22511
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't "run" JSPs. JSPs are resources within webapps. You can deploy the same webapp (WAR or EAR) file to multiple servers, but if you are intending to work with multiple servers (Tomcat or otherwise) and a single copy of a WAR, you'll have to obey certain restrictions.

People commonly use "exploded" WARs with Tomcat. If you just take a WAR file and drop it into Tomcat's webapps directory, Tomcat will automatically explode it by default. You should not attempt to share that exploded copy, each Tomcat instance needs its own CATALINA_BASE, and that means it has its own distinct webapps directory.

To literally share the exact same WAR between multiple Tomcats, you need to define a deployment descriptor that points to a codeBase WAR that's external to all Tomcat instances. For example, a build directory in your Eclipse project.

Starting multiple Tomcats from Eclipse is a whole different issue. Most Tomcat control plugins are designed with the idea that one Tomcat is enough, even if you have multiple webapp instances to debug. So to start the second Tomcat, you would have to launch it manually and connect to it via the Remote Debugging facilities. Embedded Tomcat uses Remote Debugging as well, but the Eclipse Tomcat plugin will automatically handle that one.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic