Deploying .ear file to tomcat

29,356

Tomcat doesn't support the full EE stack, it's a servlet container only. You'll have to deploy the WARs separately.

Share:
29,356
blue-sky
Author by

blue-sky

scala :: java

Updated on July 09, 2022

Comments

  • blue-sky
    blue-sky almost 2 years

    I have an .ear file which contains multiple war files.

    I am moving the app to tomcat. Once I have packaged all of the individual war files contained in the .ear for tomcat compatability how will the war files be deployed ?

    Do I just need to deploy all of the individual war files to tomcat and it should "just work" or is it not as simple as this ?

    To be more specific what is the tomcat equivalent "glue" that websphere provides to package all the wars in one ear?

  • blue-sky
    blue-sky over 12 years
    How will the wars relate to each other ? What is the tomcat equivalent "glue" that websphere provides to package all the wars in one ear?
  • Peter Svensson
    Peter Svensson over 12 years
    Short answer: there isn't ... The java EE specs is what you want to read if you want to understand the deployment structure of an EE application .
  • blue-sky
    blue-sky over 12 years
    Ok, so say I have an ear which contains two wars - war1 & war2. I convert the war1 & war2 to tomcat compatibly and deploy both wars to tomcat. Are you saying the two wars project structure will need to be amended to a single war file structure ?
  • Peter Svensson
    Peter Svensson over 12 years
    No you can deploy multiple wars in Tomcat.
  • blue-sky
    blue-sky over 12 years
    Maybe I am asking the same question in a different way but why are multiple war packaged in an ear file, why not just deploy each war separately. I'm just a little unsure as to how to understand how each war relates to each other, maybe this relationship is unique for all .ear files?
  • Peter Svensson
    Peter Svensson over 12 years
    Read up on the specs. Basically the EAR can contain multiple WARs, EJB jars and connector RARs. The EAR file can also contain common libs used by the contained components (minimize total size by not packaging all libs in every WAR for instance)...