Pid * wrote:
> 
> On 14/09/2011 11:55, Darius D. wrote:
> 
> They are in *that* thread.
> 
> It is possible to expose either request or response object outside of
> the scope of the thread, so a second request sees a modified version of
> the same object.
> 
> E.g.
> 
>  public class SomeServlet extends HttpServlet {
> 
>    private HttpServletRequest request;
> 
>    protected void doGet(HttpServletRequest rq, HttpServletResponse rs) {
> 
>      // this is a handy value, let's store it (FAIL!)
>      this.request = request;
> 
>      // do something...
>      process(this.request);
>      // finish...
> 
>    }
> 
>  }
> 
> 
> So a different thread entering the method causes the request object to
> be updated before the other thread has finished using it.  There are
> other, more subtle, ways to cause the same effect.
> 
> 
> p
> 

Well the problem is that we already looked for that mode of failure, our
servlet class has 0 instance variables... Basically it is a method like i
pasted before, doing HttpSession session = request.getSession(); and if
session is valid (it is!) immediately reading those params with String
action = request.getParameter("type");

Request object is perfectly valid when those params are missing ( session,
query etc are preserved, its just those params we are missing ). Error
happens in bursts in a rate of ~25 / million requests.







-- 
View this message in context: 
http://old.nabble.com/Request-params-randomly-null-in-servlet%28s%29-tp32461421p32464563.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to