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 251290 - context path is not set in web project since 201503190001 build
Summary: context path is not set in web project since 201503190001 build
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 8.1
Hardware: All All
: P2 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-19 12:46 UTC by Masaki Katakai
Modified: 2015-03-25 03:21 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot of project dialog. Context path is different. (63.62 KB, image/png)
2015-03-19 12:46 UTC, Masaki Katakai
Details
opening test resource url fails (66.56 KB, image/png)
2015-03-19 12:50 UTC, Masaki Katakai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Masaki Katakai 2015-03-19 12:46:19 UTC
Created attachment 152715 [details]
screenshot of project dialog. Context path is different.

Product Version: NetBeans IDE Dev (Build 1)
Updates: Updates available
Java: 1.8.0_40; Java HotSpot(TM) 64-Bit Server VM 25.40-b25
Runtime: Java(TM) SE Runtime Environment 1.8.0_40-b26
System: Linux version 3.2.0-4-amd64 running on amd64; ANSI_X3.4-1968; en_US (nb)

I have tried the same operation on today and yesterday,
on build 201503190001 and 201503180001, and noticed that
web application does not set Context Path in project.

Please refer the snapshot.

This will cause issue that Test Resource Url can not be accessed.
NetBeans opens the following url,

   http://localhost:8080//webresources/test.customer

The correct URL is

   http://localhost:8080/WebApplication2/webresources/test.customer

Please refer the screenshot.
Comment 1 Masaki Katakai 2015-03-19 12:49:57 UTC
Step:

1. start netbeans
2. create a web project (I tried maven web project and got the same result)
3. just run

   The following url is opened,

   201503180001
   http://localhost:8080/WebApplication2/

   201503190001
   http://localhost:8080/web/

4. create RESTful web services from database
5. try to open "Test Resource Url"

   201503180001
   http://localhost:8080/WebApplication2/webresources/test.customer

   201503190001
   http://localhost:8080//webresources/test.customer
   (It causes error dialog)
Comment 2 Masaki Katakai 2015-03-19 12:50:46 UTC
Created attachment 152717 [details]
opening test resource url fails
Comment 3 Petr Hejl 2015-03-23 10:17:08 UTC
This might be server specific. What server do you use?
Comment 4 Petr Hejl 2015-03-23 10:19:58 UTC
Ok, I can reproduce it using GlassFish. Might be related to recent fixes.
Comment 5 Petr Hejl 2015-03-23 15:47:43 UTC
This was caused by recent fixes for #233481. I have fixed that in web-main 120f88defdb3. I'm not sure why the change of web DD to resources files. If I understand it properly, resources file serves different purpose. Tomasi please review.
Comment 6 TomasKraus 2015-03-24 12:12:06 UTC
Fix looks good, thank you Peter for taking care of this.
Comment 7 Quality Engineering 2015-03-25 03:21:05 UTC
Integrated into 'main-silver', will be available in build *201503250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/120f88defdb3
User: Petr Hejl <phejl@netbeans.org>
Log: #251290 - context path is not set in web project since 201503190001 build