Actually, the default behavior does make sense generally. If you add a
framework to your project, you can not expect the application server to
have the required libraries. In this case GlassFish includes JAX-RS
(Jersey), but simply selecting Apache Tomcat as a server choice would
require them.
Also the version on the server can be overridden by the packaged version.
This is accomplished easily by adding the 1.11 framework to your project.
In the case of Apache Tomcat you would simply deploy those bits, for
GlassFish we need to change the sun-web.xml or glassfish-web.xml to
override the classloader and set it to false. Otherwise you will load the
default JAX-RS implementation from Java EE instead of 1.11
<SNIP>
<glassfish-web-app error-url="">
<context-root>/jersey</context-root>
<class-loader delegate="false"/> <!-- NEEDS TO BE SET TO FALSE TO USE
1.11 PACKAGED IN WAR -->
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class' java
code.</description>
</property>
</jsp-config>
</glassfish-web-app>
</SNIP>
____________________________
John Yeary
____________________________
<http://javaevangelist.blogspot.com/> <https://twitter.com/jyeary>
<http://www.youtube.com/johnyeary>
<http://www.linkedin.com/in/jyeary>
<https://plus.google.com/112146428878473069965>
<http://www.facebook.com/jyeary>
<http://feeds.feedburner.com/JavaEvangelistJohnYearysBlog>
<http://netbeans.org/people/84414-jyeary>
____________________________
"Far better it is to dare mighty things, to win glorious triumphs, even
though checkered by failure, than to take rank with those poor spirits who
neither enjoy much nor suffer much, because they live in the gray twilight
that knows not victory nor defeat."
-- Theodore Roosevelt
Post by Jan AlgermissenThanks John! I figured that out after a while.
Post by John YearyHello Jan,
You can right-click on the project and go to Properties --> libraries
and uncheck the package checkboxes to not include the jars in your war
file. This will resolve to using the default EE implementation in GlassFish.
Still unintuitive, that GF is doing that by default.
Jan
Post by John YearySee attached image.
John
____________________________
John Yeary
____________________________
____________________________
"Far better it is to dare mighty things, to win glorious triumphs, even
though checkered by failure, than to take rank with those poor spirits who
neither enjoy much nor suffer much, because they live in the gray twilight
that knows not victory nor defeat."
Post by John Yeary-- Theodore Roosevelt
On Tue, Jan 24, 2012 at 12:10 PM, Jan Algermissen <
Hi,
sorry if this is slightly off-topic, but I figured that most of the
knowledgeable and likely interested people are on this list.
Post by John YearyI am working on a Java EE 6 application, using JAX-RS but no Jersey
specific features. However, when I build the application, Netbeans includes
jersey libraries in the WAR. When I deploy that WAR to JBoss 6 there seems
com.sun.jersey.core.util.FeaturesAndProperties"
Post by John YearyDoes anyone know, whet the Jersey libs are included in the WAR and if I
can keep netbeans from doing that?
Post by John YearyJan
<PackageSelection.png>