Japod's blog
Archives
« December 2009
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today
Click me to subscribe
Search

Links
 

View My Stats
« Previous page | Main | Next page »
Thursday Nov 06, 2008
Jersey 1.0 Available on GlassFish V3 Prelude Update Center

Today, GlassFish V3 Prelude, was launched. As Paul has written, Jersey 1.0 is part of the ensemble, and I would like to show, how to get JAX-RS and Jersey support installed on it.

Jersey package is available on GlassFish V3 Prelude update center, which is easily accessible from GlassFish admin console. After you start your GlassFish instance, the default location for the admin console is http://localhost:4848/

GlassFish V3 Prelude Admin Console Snapshot

You will just click on the Available Add-Ons button. Then the following table should appear:

GlassFish V3 Prelude Update Center Client Snapshot

Select Jersey package there and click on the Install button. You will need to confirm your selection and also agree with the provided license. Then after a while, Jersey package will be installed:

GlassFish V3 Prelude Update Center Jersey Package Installed Snapshot

In order for changes to take effect, you will now need to restart your GlassFish instance.

Besides Jersey 1.0 modules, the package will also install some additional samples and docs. Check your $AS_HOME/jersey/README.html for further details. The important thing is, that:

Now you do not need to bundle Jersey jars with your webapp any more!

And indeed, if you go to $AS_HOME/jersey/samples/helloworld-webapp and try

mvn clean package

you will see, that the resulting target/helloworld-webapp.war has only about 6kB!

Posted at 05:07PM Nov 06, 2008 by Jakub Podlesak in REST  |  Comments[0]

Friday Oct 31, 2008
TechTip on Configuring JSON in Jersey

Ed Ort has just written me, that my tech tip on configuring JSON format in Jersey was featured on the front page of java.sun.com:

The tech tip itself is available at the enterprise tech tips blog page.

I am currently working with Martin Grebac on a better JAXB integration, so that described JSON configuration could be simplified in the future versions of Jersey.

Posted at 06:15PM Oct 31, 2008 by Jakub Podlesak in REST  |  Comments[0]

Tuesday Jun 24, 2008
Jersey 0.8 Available At GlassFish Update Centers

Information on Jersey 0.8 update center module for GlassFish

[Read More]
Posted at 11:48AM Jun 24, 2008 by Jakub Podlesak in REST  |  Comments[0]

Tuesday Jun 03, 2008
Simple Jersey Web App With Maven Take 2: Replacing Tomcat With GlassFish

Information on how to use embedded GlassFish V3 from your maven project...

[Read More]
Posted at 11:17AM Jun 03, 2008 by Jakub Podlesak in REST  |  Comments[6]

Monday Jun 02, 2008
Building Simple Jersey Web App With Maven

Curious on how to build a simple Jersey web application with your command line and maven? ...

[Read More]
Posted at 03:55PM Jun 02, 2008 by Jakub Podlesak in REST  |  Comments[5]

Monday May 26, 2008
Workarounding Cross-domain Restriction With Jersey

Having a JSON generating REST resource, you can consume provided
data in your web page using JavaScript pretty easily. To access data
at your own site you can obviously make a HttpRequest from JavaScript code.
To access data from another site, you will need to workaround
a cross-domain restriction somehow. Two possible approaches are described
at Dan Theurer's blog entries here and here.

In this entry i will show how to add the JavaScript representation option to your Jersey based REST resource, so that besides


{ some JSON data}

when your client asks for http://.../myResource.json,
you will be able to return also something like

myFunc({ some JSON data})

when it asks for http://.../myResource.js?callback=myFunc...

[Read More]
Posted at 03:16PM May 26, 2008 by Jakub Podlesak in REST  |  Comments[1]