tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 10331] - HttpReponseStream.checkHead(Http...) error
Date Fri, 28 Jun 2002 18:17:37 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10331>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10331

HttpReponseStream.checkHead(Http...) error

cyrus@microaut.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |



------- Additional Comments From cyrus@microaut.com  2002-06-28 18:17 -------
Actually, I missed some code in my previous listing.

public class testServ extends HttpServlet implements Runnable
{

  public Vector pendingReqs = new Vector();
  private Thread kicker = new Thread(this);

  ....
  ...
  public void doGet(HttpServletRequest req, HttpServletResponse resp)
	throws ServletException, java.io.IOException
  {
    pendingReqs.addElement(resp);
    try
    {
	kicker.sleep(5000);
    }
    catch(InterruptedException ie){}
    try
    {
      if(pendingReqs.size() > 0)
      {
	HttpServletResponse httpResp = 
           (HttpServletResponse)pendingReqs.remove(0);

      httpResp .setContentType("text/plain");
      PrintWriter out = httpResp .getWriter();
      out.println(s);
      out.flush();
      }
    }
    catch(UnsupportedEncodingException use)
    {
System.out.println("UnsupportedEncodingException: " + use.getMessage());
    }
    catch(IllegalStateException ise)
    {
System.out.println("IllegalStateException: " + ise.getMessage());
    }
    catch(IOException ioe)
    {
System.out.println("IOException: " + ioe.getMessage());
    }
  }

}

ERROR:
java.lang.NullPointerException
        at org.apache.catalina.connector.http.HttpResponseStream.checkHead(HttpR
esponseStream.java:253)
        at org.apache.catalina.connector.http.HttpResponseStream.<init>(HttpResp
onseStream.java:104)
        at org.apache.catalina.connector.http.HttpResponseImpl.createOutputStrea
m(HttpResponseImpl.java:220)
        at org.apache.catalina.connector.ResponseBase.getWriter(ResponseBase.jav
a:758)
        at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade
.java:165)

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message