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 205392

Summary: Change the default RESTful URL to /restful
Product: webservices Reporter: arungupta <arungupta>
Component: RESTAssignee: Denis Anisimov <ads>
Status: RESOLVED FIXED    
Severity: normal CC: arungupta, marfous, pjiricka
Priority: P3    
Version: 7.1   
Hardware: PC   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description arungupta 2011-11-21 23:13:58 UTC
/resources URL is reserved for serving JSF resources. So when a RESTful resource is generated, it should be served from /restful to avoid conflicts. This will ensure that JSF resources (such as CSS) are served properly.
Comment 1 Martin Fousek 2011-11-22 07:29:52 UTC
Thanks for entering this issue. Actually user can choose path for getting REST resources by generating first RESTful WS, but probably your "/restful" or something like "/services" could be proposed as the default value in the dialog.

Reassigning to WS.
Comment 2 Denis Anisimov 2011-11-22 09:37:07 UTC
>/resources URL is reserved for serving JSF resources.
NB doesn't use it as default prefix path for JSF resources.
So this mentioned agreement ( if any ) is out of NB.
Is it common practice or recommended approach ?
Please give me a link where I can read about this.

It is not a big deal to change the default prefix for RESTful WS in the wizard.
But any prefix could be potentially reserved for something. So I don't see a reason to change it on each user request.
Comment 3 arungupta 2011-11-22 14:18:51 UTC
Section 2.6.1.1 of the JSF 2.0 specification states:

The default implementation must support packaging resources in the web application root under the path
resources/<resourceIdentifier>
relative to the web app root. Resources packaged into the web app root must be accessed using the getResource*()
methods on ExternalContext.

The "resources" is reserved by the specification so it is relevant to change the default URL to "restful" or "services" or something non-"resources".
Comment 4 Denis Anisimov 2011-11-22 14:20:56 UTC
OK , thanks.
Comment 5 Martin Matula 2011-11-22 15:07:59 UTC
I'd suggest using "webresources" - that's what Jersey maven archetype uses.
Comment 6 Denis Anisimov 2011-12-26 09:07:23 UTC
web-main#813d603a0e24
Comment 7 Quality Engineering 2011-12-28 15:46:44 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/813d603a0e24
User: Denis Anisimov <ads@netbeans.org>
Log: Fix for BZ#205392 - Change the default RESTful URL to /restful