Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 10083 invoked from network); 9 Feb 2005 13:39:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 9 Feb 2005 13:39:03 -0000 Received: (qmail 83289 invoked by uid 500); 9 Feb 2005 13:38:43 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 83276 invoked by uid 500); 9 Feb 2005 13:38:43 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 83262 invoked by uid 99); 9 Feb 2005 13:38:43 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of robcos@gmail.com designates 64.233.170.199 as permitted sender) Received: from rproxy.gmail.com (HELO rproxy.gmail.com) (64.233.170.199) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 09 Feb 2005 05:38:41 -0800 Received: by rproxy.gmail.com with SMTP id 34so95649rns for ; Wed, 09 Feb 2005 05:38:39 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=Ype1l/TkirG+rWVV8uoaAZsmsVtMXjo7Gztr/3DiIhqW1j2JiCiiVEodRRomxKI2TpwOXfWgnzloGb2a8ve0OWibf84YNkthH87qmHOLQlWqRVuRRux23rHINmELS124kIbuHFtB5Wlrh3UqXmLjdJ7zw44asepD08ksiI5CUHs= Received: by 10.38.179.24 with SMTP id b24mr46438rnf; Wed, 09 Feb 2005 05:38:39 -0800 (PST) Received: by 10.38.179.58 with HTTP; Wed, 9 Feb 2005 05:38:39 -0800 (PST) Message-ID: Date: Wed, 9 Feb 2005 14:38:39 +0100 From: Roberto Cosenza Reply-To: Roberto Cosenza To: Tomcat Users List Subject: Re: IllegalStateException: getOutputStream() has already been called for this response In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <004901c50e27$b1fd7b60$704cfa53@othello> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Just don't pass the ouput stream that you get from the servlet but create a new one. When you are done with your business, you'll copy the one on the other. On Wed, 9 Feb 2005 08:24:05 -0500, DAVID TURNER wrote: > > Thanks for the advice Roberto. I agree that the approach is wrong, but in > my real application I definitely use the MVC pattern as much as possible. > > The problem I'm running into is that my servlet calls other classes to do > the business logic. One of these classes does XSLT. What I end up doing is > getting the OutputStream from the servlet and passing it down to the class > that does the transformation, which sends the results of the transformation > to this OutputStream. Exceptions could possible occur during the > transformation, and this is where I run into this problem of the jsp error > page not getting called. The use of OutputStream or Writer for the XSLT > results is what keeps me from doing exactly what you suggested. I have this > one hook, so to speak. -- Roberto Cosenza http://robcos.com --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org