servlet中传递 request

来源:互联网 发布:使命召唤8mac版迅雷 编辑:程序博客网 时间:2024/05/22 16:00

在servlet中,如果要把request传到一个线程中去,可能会抛空指针

 

To make sure the session is properly maintained, you must call this method before the response is committed. If the container is using cookies to maintain session integrity and is asked to create a new session when the response is committed, an IllegalStateException is thrown.

 

因为主线程已经 commit response, 而子线程可能还在继续跑