Jersey with Glassfish, Eclipse and Maven 2

Sud shows how to use Jersey with Glassfish, Eclipse and Maven 2.

As Sud points out the examples distributed with Jersey are a bit NetBeans focused and that can make it tricky to understand how to use Jersey in other build environments. IMHO for the most part this problem is independent of NetBeans and is due to lack of documentation, a pre-compile step used in some examples to obtain the list of root resources (classes annotated with @UriTemplate), and a required initialization parameter in the web.xml for the Jersey servlet.

Frank has started work on a branch of Jersey that will remove the need for a pre-compile step and initialization parameters and thus as a result reduce required documentation for default behavior to just one line, "use this servlet class <insert class here>", and no longer require modification of the project build.xml. This simplicity should hopefully translate into an easier understanding of how Jersey can work in other build environments.

The required jars of a project using Jersey can depend on what Java types are used for entities, see here for a list of required and optional jars.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

sandoz

Search

Archives
« April 2014
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
   
       
Today