You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Todd O'Bryan <to...@mac.com> on 2005/02/02 05:00:16 UTC
HttpServletResponse.getWriter()
I'm trying to output a plain text page as the result of calling a
listener. (It's a list of users and auto-created passwords, and I'd
like it to be savable and printable without much work.)
When I try to get the PrintWriter that corresponds to the
HttpServletResponse, I get this error:
----------------
javax.servlet.ServletException: getWriter() has already been called for
this response
org.apache.tapestry.ApplicationRuntimeException: getWriter() has
already been called for this response
component:
org.apache.tapestry.pages.Exception@42a5d9[framework:Exception]
location: classpath:/org/apache/tapestry/pages/Exception.page, line
22, column 65
java.lang.IllegalStateException: getWriter() has already been called
for this response
org.apache.coyote.tomcat5.CoyoteResponse.getOutputStream(CoyoteResponse.
java:568)
-----------------
Even more strange, it happens twice. Here's the code from my page class:
try {
HttpServletResponse response =
cycle.getRequestContext().getResponse();
PrintWriter out = response.getWriter();
I know *I'm* not calling getWriter() before this. Does anyone have an
idea of what could be?
Thanks, and sorry for all the questions. I just deployed for the first
time today, and my students have found all the bugs I couldn't when I
was just testing by myself.
Todd
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org