Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

ExecuteAndWaitInterceptor Issue - ThreadLocal object

nikunj

2008-11-26

Replies: Find Java Web Hosting

Author LoginPost Reply

Dear All,

 

Servlet container is written to be single-threaded.

 

That means that the "request" object isn't designed to be used after the

thread that handled the request has finished executing. What is

happening is this:

 

1) Thread1 handles request

2) Thread1 gives request to Tomcat

3) Tomcat starts Thread2 and executes your action

4) Thread1 finishes and cleans up request

5) Your action (on Thread2) tries to use the request

 

Step #5 causes an exception in the container. Null pointer exeception

 

How to fix this issue?

 

Can any body help me?

 

Thanks in advance

 

 

 

Regards,

 

Nikunj Mulani

Applied Software Pvt. Ltd.

Ahmedabad

91-98249 88262 

 

©2008 gg3721.com - Jax Systems, LLC, U.S.A.