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 230908 - Cross-Origin Resource Sharing Filter wizard issues
Summary: Cross-Origin Resource Sharing Filter wizard issues
Status: RESOLVED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: REST (show other bugs)
Version: 7.3.1
Hardware: All All
: P3 normal (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-07 09:58 UTC by Milan Kuchtiak
Modified: 2013-08-16 02:41 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 Milan Kuchtiak 2013-06-07 09:58:09 UTC
In Jave EE6 web application, the wizard doesn't allow user to complete the task.
The error message in the wizard panel is confusing:
! REST is not configured. Jersey based configuration is required.

At least the error message should be improved to instruct user what's needed.
Comment 1 David Konecny 2013-06-09 21:14:27 UTC
> REST is not configured. Jersey based configuration is required.

What the message is trying to say is "In EE6/JAX-RS 1.0 case the Cross Origin Resource Sharing requires REST support to be configured using Jersey servlet because wizard will generate Jersey specific filter code and will have to instrument Jersey servlet to load the filter."
Comment 2 Milan Kuchtiak 2013-08-14 15:13:29 UTC
The following entry could be generated in web.xml for existing javax.ws.core.Application:

<servlet>
  <servlet-name>org.mypackgage.ApplicationConfig</servlet-name>
  <init-param>
    <param-name>com.sun.jersey.spi.container.ContainerResponseFilters</param-name>
    <param-value>org.mypackgage.CORS</param-value>
  </init-param>
</servlet>

Also I found that com.sun.jersey.spi.container.ContainerResponseFilters is missing on class-path provided by GlassFish 3.1 server. 
It's located in jersey-gf-server.jar.
Comment 3 Milan Kuchtiak 2013-08-15 08:15:35 UTC
Fixed:

http://hg.netbeans.org/web-main/rev/6f6a1e09fabc
Comment 4 Quality Engineering 2013-08-16 02:41:42 UTC
Integrated into 'main-silver', will be available in build *201308152300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/6f6a1e09fabc
User: Milan Kuchtiak <mkuchtiak@netbeans.org>
Log: #230908 allow CORS filter in JavaEE 6 projects with Jersey 1