Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6225529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:51:32+00:00 2026-05-24T08:51:32+00:00

I have multiple wars (5+) deployed in a tomcat web container as shown below:

  • 0

I have multiple wars (5+) deployed in a tomcat web container as shown below:

war1
 +-META-INF
 +-WEB-INF
       +-classes
         +-MyClass1.class
       +-libs
         +-log4j.jar
         +-spring.jar
war2
 +-META-INF
 +-WEB-INF
       +-classes
         +-MyClass2.class
       +-libs
         +-log4j.jar
         +-spring.jar

As you can see there is an overlap in the libaries used by the web applications. Would I gain anything by combining my various applications into one monolithic application and deploying as shown below?

war3
 +-META-INF
 +-WEB-INF
       +-classes
         +-MyClass1.class
         +-MyClass2.class
       +-libs
         +-log4j.jar
         +-spring.jar

I’m concerned that the memory requirements of my container under the first scheme is suboptimal since log4j.jar and spring.jar are loaded twice even though they’re exact same versions. I don’t really know how web containers work – perhaps the web container (Tomcat) is intelligent enough not to load the libraries twice.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:51:32+00:00Added an answer on May 24, 2026 at 8:51 am

    Refer to https://sec1.woopra.com/docs/class-loader-howto.html for a link on how tomcat classloaders work.

    In your current structure, the classes will be loaded by separate classloaders specific to each webapp and if this concerns you, can modify your layout to put the common classes separately. But the one thing that I’d be worried about is, that this limits your individual applications flexibility. If you want to upgrade one application from Spring 2.5 to 3.0 and not the others, you can’t if the jars are shared.

    Unless you are actually seeing problems with multiple applications suffering because of including individual jars with each app, I wouldn’t change it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have multiple classes that all derive from a base class, now some of
I have a project which needs to deploy multiple wars on a tomcat instance.
I have multiple containers like this <div class=container> <span> <!-- Inside the span is
I have multiple inheritance like this one: Can I extend a class using more
I have multiple classes and threads that need to write to a Java Swing
I want to share ehcache in multiple wars. I have put ehcache-core-2.2 jar in
I have multiple classes that are not allowed to modify each other's fields, but
I have multiple lists like below [u'a', 11, u'P'] [u'a', 11, u'A'] [u'b', 2,
We have multiple war files packaged in an ear file. Some of the wars
I have multiple selects: <select id=one> <option value=1>one</option> <option value=2>two</option> <option value=3>three</option> </select> <select

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.