Author: markt Date: Thu May 19 08:55:43 2011 New Revision: 1124614 URL: http://svn.apache.org/viewvc?rev=1124614&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51229 Fix bugs in the Servlet 3.0 asynchronous examples. Patch provided by Eiji Takahashi.
Modified: tomcat/trunk/webapps/docs/changelog.xml tomcat/trunk/webapps/examples/WEB-INF/classes/async/Async0.java tomcat/trunk/webapps/examples/jsp/async/index.jsp Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1124614&r1=1124613&r2=1124614&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Thu May 19 08:55:43 2011 @@ -63,6 +63,10 @@ <add> Add documentation for AJP-NIO connector. (markt/rjung) </add> + <fix> + <bug>51229</bug>: Fix bugs in the Servlet 3.0 asynchronous examples. + Patch provided by Eiji Takahashi. (markt) + </fix> </changelog> </subsection> <subsection name="Other"> Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/async/Async0.java URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/async/Async0.java?rev=1124614&r1=1124613&r2=1124614&view=diff ============================================================================== --- tomcat/trunk/webapps/examples/WEB-INF/classes/async/Async0.java (original) +++ tomcat/trunk/webapps/examples/WEB-INF/classes/async/Async0.java Thu May 19 08:55:43 2011 @@ -37,9 +37,9 @@ public class Async0 extends HttpServlet protected void service(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { if (Boolean.TRUE == req.getAttribute("dispatch")) { log.info("Received dispatch, completing on the worker thread."); - req.getAsyncContext().complete(); log.info("After complete called started:"+req.isAsyncStarted()); resp.getWriter().write("Async dispatch worked:+"+System.currentTimeMillis()+"\n"); + req.getAsyncContext().complete(); } else { resp.setContentType("text/plain"); final AsyncContext actx = req.startAsync(); Modified: tomcat/trunk/webapps/examples/jsp/async/index.jsp URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/jsp/async/index.jsp?rev=1124614&r1=1124613&r2=1124614&view=diff ============================================================================== --- tomcat/trunk/webapps/examples/jsp/async/index.jsp (original) +++ tomcat/trunk/webapps/examples/jsp/async/index.jsp Thu May 19 08:55:43 2011 @@ -65,5 +65,5 @@ Use cases: 7. Stock ticker - <a href="<%=response.encodeURL("/examples/async/stock")%>"> StockTicker </a> + <a href="<%=response.encodeURL("/examples/async/stockticker")%>"> StockTicker </a> </pre> \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org