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 209344 - glassfish-web.xml editor inserts "/context" as context-root
Summary: glassfish-web.xml editor inserts "/context" as context-root
Status: RESOLVED WORKSFORME
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.1.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-08 20:00 UTC by _ gtzabari
Modified: 2012-05-17 18:35 UTC (History)
0 users

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 _ gtzabari 2012-03-08 20:00:27 UTC
Product Version: NetBeans IDE 7.1.1 (Build 201203012225)
Java: 1.7.0_03; Java HotSpot(TM) 64-Bit Server VM 22.1-b02
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
User directory: C:\Users\Gili\.netbeans\7.1.1
Cache directory: C:\Users\Gili\.netbeans\7.1.1\var\cache

1. Create a Maven web project
2. Create glassfish-web.xml using the Netbeans wizard.
3. Set the Context Root to "/foo" using the Netbeans editor in the "General" tab.
4. Click on XML.
5. Notice that Netbeans injects:

    <sun-web-app error-url="">
      <context-root>/context</context-root>
      <class-loader delegate="false"/>
    </sun-web-app>

into the file in two places.
6. Notice that <context-root> is set to /context in contradiction to /foo which we set.

As a result, hitting F6 to run a web project deploys it into /foo, but "Deploy on Save" deploys into /context instead.

I believe this might trigger http://java.net/jira/browse/GLASSFISH-18482 because the same webapp is being deployed to conflicting context paths.
Comment 1 Vince Kraemer 2012-05-17 18:09:59 UTC
could not replicate on Mac with 7.1.1... so it may be a Windows specific issue.  I will try it out there.
Comment 2 Vince Kraemer 2012-05-17 18:35:49 UTC
could not replicate on windows 7 (32 bit) with jdk 7 update 4.

Couple of questions...

1. is GF registered in the IDE when the project is created
2. is gf registered when the glassfish-web.xmlfile is created
3. what 'release' is the web app... j2ee 1.4, java ee 5 or java ee 6
4. did the web app project 'target' GF, TomCat or 'no server selected'

Please reopen with answers and/or additional details about the project, ide configuration, etc. and i will take another look at this.