Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Pro JSP
|
Pro JSP Advanced JSP coding questions. Beginning questions will be redirected to the Beginning JSP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro JSP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 13th, 2006, 10:55 PM
Registered User
 
Join Date: Sep 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default java.lang.IllegalStateException: getWriter()

Hi there,
Plz help me to resolve the following exception..

java.lang.IllegalStateException: getWriter() has already been called for this response
    at org.apache.coyote.tomcat4.CoyoteResponse.getOutput Stream(CoyoteResponse.java:572)
    at org.apache.coyote.tomcat4.CoyoteResponseFacade.get OutputStream(CoyoteResponseFacade.java:156)
    at com.arrow.dpa.controller.ExcelDownload.downloadFil e(ExcelDownload.java:91)
    at com.arrow.dpa.controller.ExcelDownload.downloadFil e(ExcelDownload.java:55)
    at org.apache.jsp.Purchase_ExcelDownload_jsp._jspServ ice(Purchase_ExcelDownload_jsp.java:301)
    at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:137)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:809)
    at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:210)
    at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:295)
    at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:241)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:809)

 
Old February 7th, 2007, 01:58 AM
Registered User
 
Join Date: Feb 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think you have already called getOutputStream method on the response object.

You cant call both the methods on same response object
Anyhow you can call the same methods any number of times
i mean u can call getWriter method any number times but not the both






Similar Threads
Thread Thread Starter Forum Replies Last Post
Root Cause:java.lang.NoSuchMethodError: java.util. anees81 JSP Basics 3 March 1st, 2011 08:55 AM
java.lang.OutOfMemoryError: Java heap space meetkotresh J2EE 1 February 2nd, 2008 01:52 AM
java.lang.IllegalStateException: priyatowin J2EE 0 September 13th, 2006 10:57 PM
java.lang.StackOverFlowError mrafeeq Pro Java 0 August 10th, 2006 12:51 PM
java.lang.Runtime mudasirw J2EE 1 August 2nd, 2005 02:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.