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

  • SEARCH
  • Home
  • 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 677349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:01:47+00:00 2026-05-14T01:01:47+00:00

I basically want to be able to deploy multiple versions of the same EAR

  • 0

I basically want to be able to deploy multiple versions of the same EAR file to the same server (Glassfish instance?) , and have a unique path to each version separating them.

From my reading on this it appears that multiple EARs deploy to the root of the web server namespace so that they can coexist if they do not have colliding context-root’s of WAR’s.

In my case I’d rather have that instead of everything going under “/”, I’d like to be able to brand a given EAR-file build to ALWAYS deploy under a given path like “/foo-20100319” or “/foo-CUSTOMER-20010101”. This can easily be done with a single WAR file just by renaming it. I do not need or want them to disturb each other.

It is my understanding that this remapping is outside the scope of the application.xml file, so I found that http://docs.sun.com/app/docs/doc/820-7693/beayr?a=view says that I can specify web-uri and context-root, but I am not certain that what I wish to do, can be specified with these in Glassfish.

How should I approach this? I have full control over the build process.

(I have found Deploying multiple Java web apps to Glassfish in one go but I am not certain how to apply this to what I need).

  • 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-14T01:01:47+00:00Added an answer on May 14, 2026 at 1:01 am

    The application.xml allows you to map a web app that is enclosed in an ear to the context root of your choice. You can also do this with the sun-application.xml.

    Since you have full control over the build process, the choice is yours.

    You may want to read about the –deploymentplan option of the deploy subcommand of GlassFish’s asadmin utility. It allows you to mix additional files into the deployed archive before deployment processing… So, you can create a single ‘generic’ ear file and a number of shorter deploymentplan files, that ‘mix-in’ the sun-application.xml file necessary to create a customized deployment.

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

Sidebar

Related Questions

I have a scraping object basically. I want to be able to add POST
I have two action methods that are conflicting. Basically, I want to be able
I am in a situation where I basically want to be able to have
I basically want rsync, but don't have the luxury of being able to install
Basically I want to be able to have a custom control: public class MyControl
Basically I want to be able to have each node of type tree have
I have a large multidimensional array and I basically want to drop the first
Basically I want to be able to invoke a given command, in this case
Basically i want to be able to type in http://mysites and it show me
I have a few separate application projects (EARs) with multiple EJBs that I want

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.