Summary: | Exception when response.getOutputStream is used in JSP-Page | ||
---|---|---|---|
Product: | Tomcat 5 | Reporter: | Sven <sven.koehler> |
Component: | Jasper | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 5.5.6 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All |
Description
Sven
2004-12-14 23:49:35 UTC
The fact that you're calling reset doesn't change the fact that you still have a pointer to the writer. The JSP-Page <!-- $Id: index.jsp,v 1.39 2004/10/31 20:45:29 sven Exp $ --> <%@ page import="java.io.*" %> <%@ page import="java.util.*" %> <% response.reset(); response.setContentType("text/html"); OutputStream os = response.getOutputStream(); os.write("wurst".getBytes()); os.close(); return; %> works as expected, the client will get 5 bytes of content. Only the cleanup-code in a finally-block in the compiled JSP-Page causes the exception. If you want to discuss fine points in the specification (such as JSP's usage of a writer), you should IMO try somewhere other than bugzilla. Thank you, and please do not reopen the report. |