I think it's because you are doing an out.print before you get the 
outputstream. Even if you removed it there's a good chance JRun would put 
one in when the page compiles. You might want to consider using a servlet 
for this instead.
Thanks,
Jason Jolley


>From: "Ouyang, Sonny" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: JRun-Talk <[EMAIL PROTECTED]>
>Subject: IllegalStateException on response.getOutputStream()
>Date: Tue, 08 May 2001 17:28:34 -0400
>
>Hi guys,
>
>I try to get a outputStream from the response object in the jsp page but I
>got IllegalStateException. Does anyone know what I did wrong?
>
>Thanks
>
>Sonny
>
>
>jsp page
>------------------------------------------------------------
>
><%@ page import="com.globalspec.util.URL2HTML" %>
><%@ page import="java.io.*" %>
>
><%
>
>out.print("This is a test");
>out.flush();
>OutputStream outStream = response.getOutputStream();
>if (outStream == null)
>{
>       out.print("output stream is null");
>} else
>{
>       URL2HTML.print("http://www.microsoft.com";, outStream);
>}
>%>
>
>----------------------------------------------------
>
>output from the jsp page
>--------------------------------------------------------
>This is a test
>500 Internal Server Error
>/WebScratch/jsp/testURL.jsp:
>
>null
>java.lang.IllegalStateException
>       at
>allaire.jrun.servlet.JRunResponse.getOutputStream(JRunResponse.java:294)
>       at
>jrun__WebScratch__jsp__testURL2ejsp1b._jspService(jrun__WebScratch__jsp__tes
>tURL2ejsp1b.java:48)
>       at allaire.jrun.jsp.HttpJSPServlet.service(HttpJSPServlet.java:40)
>       at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
>       at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java, Compiled
>Code)
>       at
>allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:34
>)
>       at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:174)
>       at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
>       at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java, Compiled
>Code)
>       at
>allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav
>a:88)
>       at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
>       at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
>       at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)
>       at allaire.jrun.ThreadPool.run(ThreadPool.java, Compiled Code)
>       at allaire.jrun.WorkerThread.run(WorkerThread.java, Compiled Code)
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to