-
Website
http://www.dobesland.com -
Original page
http://www.dobesland.com/2008/01/15/glassfish-setting-the-context-root-of-a-war-inside-an-ear/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
spangen
1 comment · 1 points
-
Janette Toral
1 comment · 11 points
-
Targe
1 comment · 1 points
-
dobes_vandermeer
17 comments · 3 points
-
sujitkale
1 comment · 1 points
-
-
Popular Threads
This was just what I needed. I also did not quite figure out what happend.
Thank your for sharing this!
One can log in (default username/password are "admin" and "adminadmin" respectively), go to Applications->WebApplications, click on the name of your one and you'll see to the right the Context Root option which you can change and click "Save" and you're done.
FWIW, anyone who didn't know already, you CAN change the context root of a WAR file by editing it's web.xml or sun-web.xml, as long as it's not being deployed as part of an EAR file.
Ane help?
Another option is to set the war as the "default web application" in the
glassfish admin panel, I believe it's the virtual server configuration that
lets you do that.
Initially there was no application.xml listed in my deployment descriptors for my EAR, and my context root _still_ wasn't being set to "/"
I generated the Application.xml by right clicking the EAR in eclipse, and selecting "Generate Deployment Descriptor Stub". This created an application.xml that I could edit in eclipse before deploying to Glassfish