简体   繁体   中英

How to deploy JAX-RS Application in WAS 7.0.23?

I am using RAD and WAS 7.0.23, and try to deploy jax-rs in it. But I am getting below error in deployment descriptor(Web.xml).

Error 404: javax.servlet.UnavailableException: SRVE0200E: Servlet [com.ibm.websphere.jaxrs.server.IBMRestServlet]: Could not find required class - class java.lang.ClassNotFoundException: com.ibm.websphere.jaxrs.server.IBMRestServlet

Servlet Mapping

  <servlet> <description>JAX-RS Tools Generated - Do not modify</description> <servlet-name>JAX-RS Servlet</servlet-name> <servlet-class>com.ibm.websphere.jaxrs.server.IBMRestServlet</servlet-class> <init-param> <param-name>javax.ws.rs.Application</param-name> <param-value>APPLICATION CLASS</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>JAX-RS Servlet</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping> 

JAX-RS wasn't added to WAS until 8.0. If you want to use JAX-RS on that old a server (which I generally wouldn't recommend for the reason Andy mentioned above), you'll need to bring your own provider.

First, I agree that continuing to use the well-out-of-support 7.0 is unwise.

That said, it may just be that you need to add the jar to the RAD project's "Deployment Assembly", in addition to the "Java Build Path".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM