tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Calum <>
Subject Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7
Date Mon, 20 Jun 2011 10:12:03 GMT
On 15 June 2011 18:54, Konstantin Kolinko <> wrote:
> The request and response objects must never be accessed outside the
> request processing cycle.  The objects are recycled and cleared or
> reused for subsequent request and responses, and are not guaranteed to
> be thread-safe.  The consequences can be severe.

I was interested by this.

    private Service service;

    public void init() throws ServletException {
        service = (Service)

    protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
            throws ServletException, IOException {

is a bad thing?
Could you explain why?
I would assume that a new request object is created each time, and
that while something has a reference to it, it will be fine, and when
logHit has finished with it, it will be eligible for garbage


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message