Author: fhanik
Date: Fri Oct 16 00:09:48 2009
New Revision: 825711
URL: http://svn.apache.org/viewvc?rev=825711&view=rev
Log:
simplify example
Modified:
tomcat/trunk/webapps/examples/WEB-INF/classes/async/AsyncStockServlet.java
Modified:
tomcat/trunk/webapps/examples/WEB-INF/classes/async/AsyncStockServlet.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/async/AsyncStockServlet.java?rev=825711&r1=825710&r2=825711&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/async/AsyncStockServlet.java
(original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/async/AsyncStockServlet.java
Fri Oct 16 00:09:48 2009
@@ -54,19 +54,6 @@
@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 void onTimeout(AsyncEvent event) throws IOException {
event.getRequest().getAsyncContext().complete();
}
-
-
-
-
-
-
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]