我正面临着制作网络服务的问题
抛出java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1891) 在 org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1734) 在 org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:504) 在 org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:486) 在 org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:113) 在 org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1146) 在 org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1085) 在 org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5349) 在 org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5641) 在 org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) 在 org.apache.catalina.core.ContainerBase $ StartChild.call(ContainerBase.java:1571) 在 org.apache.catalina.core.ContainerBase $ StartChild.call(ContainerBase.java:1561) at java.util.concurrent.FutureTask $ Sync.innerRun(Unknown Source)at java.util.concurrent.FutureTask.run(未知来源)at java.util.concurrent.ThreadPoolExecutor.runWorker(未知来源)at java.util.concurrent.ThreadPoolExecutor $ Worker.run(未知来源)at java.lang.Thread.run(未知来源)
我的web.xml是
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <servlet> <servlet-name>Jersey REST Service</servlet-name> <servlet-class> com.sun.jersey.spi.container.servlet.ServletContainer </servlet-class> <init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>com.helloRS</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Jersey REST Service</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping> </web-app>