title: How to use catalina.jar
body: <p>I'm using websocket function of tomcat 7.0.39, so I have to include catalina.jar into my classpath. But when I deploy my project, if I deploy the jar files into WEB-INF/lib, I get the following exception:</p>
  
  <pre><code>java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addServlet
  </code></pre>
  
  <p>and when catalina.jar is not deployed, I get ClassNotFoundException:</p>
  
  <pre><code>java.lang.ClassNotFoundException: org.apache.catalina.websocket.MessageInbound
  </code></pre>
  
  <p>Someone please help me.</p>
  
  <p>StackTrace:</p>
  
  <pre>
  java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addServlet
      at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:802)
      at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:201)
      at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1057)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:604)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1759)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2915)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:625)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:819)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:748)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)
      at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1543)
      at org.apache.catalina.startup.ContextConfig.parseWebXml(ContextConfig.java:1694)
      at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1197)
      at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:882)
      at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:317)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5081)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
      at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
      at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
  </pre>