simplify example
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 16 Oct 2009 00:09:48 +0000 (00:09 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 16 Oct 2009 00:09:48 +0000 (00:09 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@825711 13f79535-47bb-0310-9956-ffa450edef68

webapps/examples/WEB-INF/classes/async/AsyncStockServlet.java

index 560d234..a903a36 100644 (file)
@@ -54,19 +54,6 @@ public class AsyncStockServlet extends HttpServlet implements TickListener, Asyn
     @Override
     protected void service(HttpServletRequest req, HttpServletResponse resp)
             throws ServletException, IOException {
-        //get the client Id, it should be in the URL
-        String clientId = req.getParameter("clientId");
-        //get the method this client prefers
-        String method = req.getParameter("method");
-
-        //if the client doesn't have a method defined, then we will assume it is POLLING
-        if (method==null) method = POLL;
-        //if the client hasn't specified its own clientId, abort
-//        if (clientId==null) {
-//            resp.sendError(404,"Client not found.");
-//            return;
-//        }
-        
         if (req.isAsyncStarted()) {
             req.getAsyncContext().complete();
         } else if (req.isAsyncSupported()) {
@@ -131,10 +118,4 @@ public class AsyncStockServlet extends HttpServlet implements TickListener, Asyn
     public void onTimeout(AsyncEvent event) throws IOException {
         event.getRequest().getAsyncContext().complete();
     }
-    
-    
-    
-    
-    
-
 }