In WAS 7, you must define the servlet in web.xml:
<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>YOUR 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>
In addition, WAS 7 does not communicate with JAX-RS, you must add JAX-RS banners to your web module or add it as a shared library.
source share