Sorry it missed getting into the documentation beyond the readme-3.3.1, but Tomcat 3.3.1 now supports a SingleThreadModel pooling, which is enabled by default. Thus, this is normal behavior. If you wish to disable the pooling, modify the server.xml to contain:
<Servlet22Interceptor useSTMPool="false" /> Cheers, Larry > -----Original Message----- > From: Andy Eastham [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 15, 2002 7:24 AM > To: Tomcat Users List > Subject: RE: HTTP Tunnelling problem?? Please help > > > Stuart, > > You're extending Thread - everything that is mapped to a > Tomcat request must > extend HttpServlet. Tomcat is trying to cast your TestTunnel class to > HttpServlet, which is failing. > > Andy > > > -----Original Message----- > > From: Stuart Stephen [mailto:[EMAIL PROTECTED]] > > Sent: 15 May 2002 11:56 > > To: Tomcat Users List > > Subject: HTTP Tunnelling problem?? Please help > > > > > > > > Hello all, > > > > I'm having problems trying to write a HttpTunnel for java objects > > in Tomcat. > > For some reason I'm getting a ClassCastException. I don't > understand this. > > I've even tried forcing it as you can see in my code below. > The exception > > that i'm getting is not very clear and i can't put my finger on it. > > > > I have attached the exception from Apache/Tomcat and the code for > > the tunnel > > at the bottom of this email. If you can help I would be > very grateful. > > > > Regards, > > Stuart Stephen > > > > ------------------------------------------------------------------ > > ---------- > > ---- > > > > Apache Tomcat/4.0.1 - HTTP Status 500 - Internal Server Error > > > > ------------------------------------------------------------------ > > ---------- > > ---- > > > > type Exception report > > > > message Internal Server Error > > > > description The server encountered an internal error (Internal > > Server Error) > > that prevented it from fulfilling this request. > > > > exception > > > > java.lang.ClassCastException: TestTunnel > > at > > > org.apache.catalina.core.StandardWrapper.load(StandardWrapper. > java:820) > > at > > org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper. > > java:615) > > at > > org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerSe > > rvlet.java > > :396) > > at > > > org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServl > et.java:180) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A > > pplication > > FilterChain.java:247) > > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati > > onFilterCh > > ain.java:193) > > at > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp > > erValve.ja > > va:243) > > at > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel > > ine.java:5 > > 66) > > at > > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline. > > java:472) > > at > > > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > > at > > org.apache.catalina.core.StandardContextValve.invoke(StandardConte > > xtValve.ja > > va:201) > > at > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel > > ine.java:5 > > 66) > > at > > org.apache.catalina.valves.CertificatesValve.invoke(CertificatesVa > > lve.java:2 > > 46) > > at > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel > > ine.java:5 > > 64) > > at > > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline. > > java:472) > > at > > > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > > at > > > org.apache.catalina.core.StandardContext.invoke(StandardContex > t.java:2344) > > at > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValv > > e.java:164 > > ) > > at > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel > > ine.java:5 > > 66) > > at > > org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispat > > cherValve. > > java:170) > > at > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel > > ine.java:5 > > 64) > > at > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValv > > e.java:170 > > ) > > at > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel > > ine.java:5 > > 64) > > at > > > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValv > e.java:462) > > at > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel > > ine.java:5 > > 64) > > at > > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline. > > java:472) > > at > > > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > > at > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngine > > Valve.java > > :163) > > at > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel > > ine.java:5 > > 66) > > at > > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline. > > java:472) > > at > > > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > > at > > > org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:371) > > at > > org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:424) > > at java.lang.Thread.run(Unknown Source) > > > > ----------------------- > > > > import javax.servlet.*; > > import javax.servlet.http.*; > > import javax.servlet.ServletException.*; > > import javax.servlet.UnavailableException.*; > > import java.lang.Exception.*; > > import java.io.*; > > import java.util.*; > > import java.net.*; > > > > public class TestTunnel extends Thread { > > > > // applet connections > > ObjectOutputStream objOut = null; > > ObjectInputStream objIn = null; > > > > // chatserver connections > > Socket socket = null; > > ObjectOutputStream sockObjOut = null; > > ObjectInputStream sockObjIn = null; > > > > ToApplet app = null; > > ToServer ser = null; > > > > protected void service(HttpServletRequest req, > HttpServletResponse res) > > throws ServletException,IOException { > > try { > > // get data stream from applet > > System.err.println("start of servlet"); > > > > objIn = new ObjectInputStream(req.getInputStream()); > > objOut = new ObjectOutputStream(res.getOutputStream()); > > > > // create socket to chat server and the streams > > socket = new Socket("127.0.0.1", 3000); > > sockObjOut = new ObjectOutputStream(socket.getOutputStream()); > > sockObjIn = new ObjectInputStream(socket.getInputStream()); > > > > app = new ToApplet((TestTunnel)this); > > ser = new ToServer((TestTunnel)this); > > > > System.err.println("end of servlet"); > > } > > catch(Exception e) { > > e.printStackTrace(); > > } > > } > > > > public void destroy() { > > try { > > objIn.close(); > > objOut.close(); > > sockObjIn.close(); > > sockObjOut.close(); > > socket.close(); > > } > > catch(Exception e) { > > e.printStackTrace(); > > } > > } > > > > private class ToApplet extends Thread { > > TestTunnel parent = null; > > > > public ToApplet(TestTunnel parent) { > > try { > > this.parent = parent; > > this.start(); > > } > > catch(Exception e) { > > e.printStackTrace(); > > } > > } > > > > public void run() { > > try { > > Object obj = null; > > while((obj=parent.sockObjIn.readObject())!=null) { > > write(obj); > > } > > } > > catch(Exception e) { > > e.printStackTrace(); > > } > > } > > > > public void write(Object msg) { > > try { > > parent.objOut.writeObject(msg); > > parent.objOut.flush(); > > parent.objOut.reset(); > > } > > catch(Exception e) { > > e.printStackTrace(); > > } > > } > > } > > > > private class ToServer extends Thread { > > TestTunnel parent = null; > > > > public ToServer(TestTunnel parent) { > > try { > > this.parent = parent; > > this.start(); > > } > > catch(Exception e) { > > e.printStackTrace(); > > } > > } > > > > public void run() { > > try { > > Object obj = null; > > while((obj=parent.objIn.readObject())!=null) { > > write(obj); > > } > > } > > catch(Exception e) { > > e.printStackTrace(); > > } > > } > > > > public void write(Object msg) { > > try { > > parent.sockObjOut.writeObject(msg); > > parent.sockObjOut.flush(); > > parent.sockObjOut.reset(); > > } > > catch(Exception e) { > > e.printStackTrace(); > > } > > } > > } > > } > > > > > > > > -- > > To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > > > > > > -- > To unsubscribe, e-mail: > <mailto:tomcat-user-> [EMAIL PROTECTED]> > For > additional commands, > e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>