What is the latest version of Jersey that will run with Java 5? I found the Jersey 1.3 documentation saying that Java 6 is required but I'm having troubles finding previous versions of the docs.
If you are stuck with Java 5, your need to use Jersey 1.2.
If the version is not mature enough for you, try Spring 3 MVC for building REST webservices, works with Java 5:
Spring Documentation
Spring blog article
Build RESTful web services using Spring 3 (ibm)
You sure? Jersey 1.7 guide claims 1.5 works, with some additional jars.
Related
I am currently working on migration work from SOAP to Rest consumption. I want to know
what is the best api for rest client (in my case there is no spring and Java version is 1.5)
Does JAX-RS or Apache CXF supports Java 1.5 if so what would be the version of those for dependency??
If you haven't worked so far with any REST-API, I would suggest to start with Jackson and JAX-RS. They are pretty much de facto standard.
JAX-RS was introduced in Java EE 6. (Java API for RESTful Web Services). Hence, JAX-RS is not part of Java 1.5. About Apache CXF, it is compatible with Java 1.5. CanCXFrunwithJDK1.5
I have a project that uses java 1.4, Struts 1, running on WAS 6 and I need to implements Spring Security, for show some components by a ROLE_ADMIN and ROLE_USER, what version of spring security it´s compatible with my project and i neeed to know if the configuration is like the tutorials for spring security 3.0.x that uses the web.xml.
From the FAQ:
Spring Security 2.0.x requires a minimum JDK version of 1.4 and is
built against Spring 2.0.x. It should also be compatible with
applications using Spring 2.5.x.
But when it comes to security, I would not use end-of-life products.
We are planning to develop Spring Application. In our servers JDK version is 1.5(it cannot be changes as there are so many other applications running on the same server). I am planning to use Spring core , MVC modules.SO can any one suggest which version of spring is suitable for JDK 1.5.And also suggest which version of Hibernate is suitable for the selected spring version.
Thanks in Advance,
Rajesh
Both Spring 4 and Hibernate 4 require Java 1.6 so for Java 1.5 you should use:
Spring 3.2.12.
Hibernate 3.6.10
I am developing an web application using rest web services.
I am using netbeans.
After creating the web application wizards, for creating web service
1. new-> RESTful web service from patterns -> simple root resource
2. after filling class name, package and all details, netbeans has usually option for
Use Jersey Specific Feature
In my office PC this option is there. I have install the same version of netbeans at home PC, but I am not seeing the above Use Jersey Specific feature option.
I have tried with adding jersey-core-1.13.bundle in the library as found it while googling around, but it didn't work.
I am using netbeans 7.3.1 and JavaEE 7
How should I do the same?
Hi this use jersey feature option is coming in specific configurations of jersey/JEE/Netbean. It's referenced as a bug on netbeans. It's well explained in a netbean post. Please take a look at netbean reference bug
NETBEAN BUG EXTRACT :
It's working as designed. We support REST configuration by using javax.ws.rc.core.Application subclass only.
The "Use Jersey Specific features" panel(section) was removed for
JavaEE 7 we applications, or in JavaEE 6 when Jersey 2.0 is detected
on classpath.
Thus, the use cases are the following:
1.JavaEE 7 (JAX-RS 2.0):
- javax.ws.rc.core.Application subclass configuration
JavaEE 6 + Jersey 2.0 on classpath (e.g. GlassFish 4 or Tomcat with Jersey 2.0)
javax.ws.rc.core.Application subclass configuration
JavaEE 6 + Jersey 1.x on classpath (e.g. GlassFish 3.1)
javax.ws.rc.core.Application subclass configuration or
Jersey specific configuration using web.xml
Note: this is the only case, when "Use Jersey Specific features" panel
is available
JavaEE 5 + Jersey 2.0 on classpath
Jersey specific configuration using web.xml
The general approach with REST is to get rid of Jersey specific stuff
as most as possible, and use rather JAX-RS only.
Ken, could you please update the tutorial, and remove the "Use Jersey
specific features" section (bottom wizard panel in step 5). Also the
next panel in step 5 ("Rest Resources Configuretion" panel) was
removed, and is not available anymore.
enjoy :)
I've been going off of http://www.oracle.com/technetwork/articles/javase/index-137171.html and downloaded the files but I'm a little lost since I've never done this before.
I've installed Tomcat and Eclipse Java EE IDE but I don't know what kind of project to use to create a webservice and how to load and compile the code to the service.
Am I going about this the right way in using eclipse?
That article is old. Since then, the Java standards committee created a new API named JAX-RS (The REST counterpart to JAX-WS). Like JAX-WS, this is meant to standardize REST web service layers.
Its reference implementation is Jersey, which supports JAX-RS 0.8, 1.0, and 1.1.
I understand that Apache CXF has support for JAX-RS 0.8, but it is unclear about 1.0/1.1 support.
JBoss has RESTEasy. However, it is not immediately clear which versions of JAX-RS are supported by RESTEasy.
Another popular JAX-RS framework is Restlet. Unfortunately, I can't open their site from here to say which versions of JAX-RS they support.
Here is an REST (JAX-RS) example I put together. You will probably find part 4 the most helpful:
Part 1 - The Database
Part 2 - Mapping the Database to JPA Entities
Part 3 - Mapping JPA entities to XML (using JAXB)
Part 4 - The RESTful Service
Part 5 - The Client
If all you're creating is a lightweight RESTful service you can also look at GlassFish which provides a simple http server for REST.
You'll create a web project to deploy a web service of any kind. It'll be packaged in a WAR and deployed on Tomcat.