This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 123385 - Enterprise Application won't change Context Path
Summary: Enterprise Application won't change Context Path
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: EAR (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker with 1 vote (vote)
Assignee: David Konecny
URL:
Keywords:
: 149258 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-12-04 18:44 UTC by pohl
Modified: 2016-07-07 08:56 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pohl 2007-12-04 18:44:50 UTC
Steps to reproduce:

1)  Create a new "Enterprise Application" project called "Foolicious", and have
      it also create the web application within it.

2)  Deploy your project to glassfish and run it
 
      http://localhost:8080/Foolicious-war/

3)  Surrender to your obsessive-compulsive disorder that likes short URLs by
     going into the Foolicious-war project's properties, under the Run tab, 
     and change the Context Path to "/foo"

4)  clean, build and deploy everything, and run it again.

5)  Look, in dismay, at the unchanged URL in your browser,
      and wonder why it didn't get changed to 

      http://localhost:8080/foo/

6)  Look at the enterprise project's Properties panel to see
      if it has a separate place to set the war's context path.
      See that it has no such field, and become depressed.
Comment 1 Vince Kraemer 2007-12-04 19:00:32 UTC
The context root for a web app in an ear is specified by the application.xml file (if it exists... otherwise, a default
value is used [based on the name of the war file]).

I am not sure that creating GUI editor for application.xml is really the way to address this issue.  We may want to
extend  the EAR project properties dialog to manage these values...
Comment 2 pohl 2007-12-04 19:27:28 UTC
The name of the war seems like a strange choice 
for the default, when the war itself contains the 
intended context path.  Is there a reason for not using it?
Comment 3 Vince Kraemer 2007-12-05 16:14:15 UTC
The context-root is a vendor specific notion.  One of the goals behind Java EE 5 was to eliminate the dependence on
deployment descriptor files... both the "standard" dd and any vendor specific dd.
Comment 4 pohl 2007-12-05 16:51:09 UTC
I think I understand what you're saying:  the war's context path is stored in the
sun-web.xml deployment descriptor (which is vendor-specific).

I take it that the application.xml deployment descriptor vendor-neutral?

If that's the case, it would be nice to see the application.xml file created at
the time the project is created...and to have the  ear project properties
dialog offer a field for setting the context path, as you suggested.
Comment 5 Tomas Mysik 2008-01-15 12:03:39 UTC
It's not really clear/easy how to "correctly" solve this situation. I will discuss it with more people here and let 
you know.
One notice - you can create application.xml later, just use New -> Standard Deployment Descriptor action.

Thanks for reporting.
Comment 6 David Konecny 2009-10-07 02:45:08 UTC
*** Issue 149258 has been marked as a duplicate of this issue. ***
Comment 7 Martin Balin 2016-07-07 08:56:25 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss