users@jersey.java.net

Re: [Jersey] setting up Jersey without using Maven or web applications

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 03 Feb 2009 16:45:27 +0100

On Feb 3, 2009, at 4:38 PM, Amir Pourteymour wrote:

> Hi,
>
> To use Jersey, so far I found out two ways;
>
> 1-Using web.xml in WebContent\WEB-INF of web applications, or
>
> 2-using POM.XML and using Maven.
>
> Is there any other way to point out my Jersey in some sort of an
> application-context.xml file, but without having my application as a
> web application or using Maven?
>

What do you mean by "application-context.xml " do you mean configuring
in some Spring way?

You can use Jersey with Grizzly without requiring a web-app, you can
configure up by coding (no XML required). Some of the maven-based
samples do that (like the helloworld sample). But you are not required
to use maven, you can use ant if you like, or say java -jar <app>.jar.
You just need to resolve the dependencies correctly, see here for more
details:

https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/jersey/dependencies.html/jersey/dependencies.html

Paul.