Multiple pages on IBM support seem to differ on whether JAX-RS is built in to WebSphere 8.5.
http://www.ibm.com/developerworks/websphere/techjournal/1305_gunderson/1305_gunderson.html
The most recent versions of IBM WebSphere Application Server provide support for JAX-RS. WebSphere Application Server V8.5 has support for JAX-RS built in; no extra installation is required.
http://www-01.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.nd.iseries.doc/ae/twbs_jaxrs_devenv.html?cp=SSAW57_8.5.5%2F2-13-2-38-1-1&lang=en
To develop JAX-RS applications, the JAX-RS libraries must be added to the class path definition. See the information for your assembly tools to understand how to include libraries on the class path for the JAX-RS application.
What needs to be done to run JAX-RS on WebSphere 8.5. Is the web.xml mapping required? Are additional library files required?
Java SE 8 offers support for WebSphere applications to use the latest available Java features and standards. Attention: Starting in version 8.5. 5.11, the default versions of Java are Java SE 6 or Java SE 8.
Web applications are comprised of one or more related servlets, JavaServer Pages technology (JSP files), and Hyper Text Markup Language (HTML) files that you can manage as a unit. Combined, they perform a business logic function. The web container processes servlets, JSP files, and other types of server-side includes.
WebSphere Application Server features and benefitsCreate and deploy cloud-native and web-based apps and microservices quickly with a lightweight and composable production runtime that features a single administrative console for Java and Node. js apps and APIs.
WebSphere 8.5.5 implements JAX-RS 1.1 provider, so you dont need any additional libraries. You may create mapping or not, depending on your needs. The best description of your options is here Configuring JAX-RS applications using JAX-RS 1.1 methods.
You can either:
<servlet> <servlet-name>javax.ws.rs.core.Application</servlet-name> </servlet> <servlet-mapping> <servlet-name>javax.ws.rs.core.Application</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping>
<servlet> <servlet-name>com.example.MyApplication</servlet-name> </servlet> <servlet-mapping> <servlet-name>com.example.MyApplication</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping>
@ApplicationPath
, @Path
, etc@ApplicationPath("rest") public class MyApplication extends javax.ws.rs.core.Application { } @Path("/helloworld") public class HelloWorldResource { @GET public String sayHelloWorld() { return "Hello World!"; } }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With