From: fhanik Date: Fri, 16 Oct 2009 00:09:48 +0000 (+0000) Subject: simplify example X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=7eea5853c91250bcf2e0cb62458d4c34eeac0504;p=tomcat7.0 simplify example git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@825711 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/webapps/examples/WEB-INF/classes/async/AsyncStockServlet.java b/webapps/examples/WEB-INF/classes/async/AsyncStockServlet.java index 560d234ba..a903a367b 100644 --- a/webapps/examples/WEB-INF/classes/async/AsyncStockServlet.java +++ b/webapps/examples/WEB-INF/classes/async/AsyncStockServlet.java @@ -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(); } - - - - - - }