Guest User

Untitled

a guest
Aug 20th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. IllegalStateException: Not supported on AsyncContext.startAsync(req, res)
  2. @WebServlet(name="MyTest", urlPatterns={"/MyTest"}, asyncSupported=true)
  3. public class MyTest extends HttpServlet {
  4.  
  5. @Override
  6. public void doGet(HttpServletRequest req, HttpServletResponse res)
  7. throws ServletException, IOException {
  8.  
  9. AsyncContext tmp = req.startAsync(req, res);
  10. ...
  11.  
  12. }
  13.  
  14. }
  15.  
  16. req.setAttribute("org.apache.catalina.ASYNC_SUPPORTED", true);
  17.  
  18. ((org.apache.catalina.connector.Request)req).setAsyncSupported(true);
Add Comment
Please, Sign In to add comment