Hello: 
   I use Tomcat Connector to forward servlet requests from IIs6 to tomcat5, my 
config like this: 
  file workers.properties.minimal 
  worker.list=wlb 
worker.wlb.host=localhost 
worker.wlb.port=8009 
worker.wlb.type=ajp13 
worker.wlb.socket_keepalive=1 
worker.wlb.socket_timeout=36000 
  
file uriworkermap.properties 
/jsp-examples/*=wlb 
/servlets-examples/*=wlb 
  It works fine; 
  Now I want a persistence connection to servlet,the servlet like this: 
  public class connServlet extends HttpServlet 
{ 
bool doconnect=false; 
  private void connect(HttpServletRequest req, HttpServletResponse res)throws 
IOException, ServletException 
     { 
        try { 
               ...... 
                while (doconnect==true ) 
                { try { Thread.sleep(10000L); } 
                  catch (InterruptedException i) { break; } 
                 }   
              } 
        catch (Exception e)    {   System.out.println( e.toString());  } 
      } 
     
   public void doPost(HttpServletRequest req, HttpServletResponse res) throws 
ServletException, IOException { 
     String actionType =req.getHeader("ActionType"); 
     if (actionType.equalsIgnoreCase("connect") &&  doconnect==false ) 
        {  doconnect=true; connect(req,res);return;   } 
     if (actionType.equalsIgnoreCase("disconnect")  )                 
        {  doconnect=false; return;  } 
    ..... 
       
   } 
  } 
  
It can work in tomcat5,but It can not work with Tomcat Connector in IIs6, 
if Tomcat Connector can do this ? 
  thanks! 
  peng 


__________________________________________________
赶快注册雅虎超大容量免费邮箱?
http://cn.mail.yahoo.com

Reply via email to