You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Raquel Hernández Martinez <rh...@evendor.es> on 2009/06/01 08:28:48 UTC
Re: Apache Tomcat hangs
Hi Christopher,
my jsp invoke to the servlet and it writes a
pdf into a file ant send it by email. I need this functionality
because it´s the user who decides to generate or not this report. My
version of jasper report it´s 2.0, I don´t know if it´s
can be a bug for this version, because my tomcat hangs when it´s
generate a pdf and after one hour appears this
error. Do you think that this can be hang the tomcat?
I´ll try set session="true" and test it.
Many
thanks for your help Chris.
Raquel
> -----BEGIN
PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
Raquel,
>
> On 5/29/2009 6:35 AM, Raquel
Hernández Martinez wrote:
>> I am using apache
Tomcat 5.5 which is set up on a hp-ux machine.
>> my
application uses jaspert-reports
>> At times during we use
jaspert-rerpot for generate to a pdf, get an
>> error
>> as shown below, and this causes the servers hangs and can not
log on the
>> tomcat console and application.
>
> Ugh... are you really using JSP to generate a PDF through jasper
> reports? Does the JSP actually generate a PDF to the output
stream, or
> do you write the PDF to a file and then redirect to
it or something like
> that?
>
> JSP wasn't
designed to generate binary content, although it /can/ be
>
beaten into submission in order to do so.
>
>>
SEVERE: Exception initializing page context
>>
java.lang.IllegalStateException: Cannot create a session after the
>> response has been committed
>> at
org.apache.catalina.connector.Request.doGetSession(Unknown
>>
Source)
>
> [snip]
>
>> at
>> org.apache.catalina.core.ApplicationDispatcher.include(Unknown
>> Source)
>> at
org.apache.jasper.runtime.JspRuntimeLibrary.include(Unknown
>>
Source)
>> at
>>
org.apache.jsp.jsp.Alarma_Detalle_Service_jsp._jspService(Alarma_Detalle_Service_jsp.java:122)
>
> The problem is that you are "including"
one page from another, and the
> page you are calling requires a
session. The including page apparently
> does /not/ need a
session, and so the included page tries to create one.
>
> In spite of the fact that the servlet spec specifically forbids
this,
> Tomcat is trying it, anyway, and when the session is
created, a
> Set-Cookie header needs to be sent to the browser.
If the headers have
> already been sent, you get this error.
>
> Solutions?
>
> I'd set
session="true" in "Alarma
Detalle Service.jsp"
and see if that
> helps.
>
> I'd also try not
to generate PDF output from a JSP ;)
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9
(MingW32)
> Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org/
>
>
iEYEARECAAYFAkogrMEACgkQ9CaO5/Lv0PD7zwCfcsAPP4svbeje8grUXb/bhtMA
> CZwAoK/kH6NgoELp7VDwXT5CIxkHUiC0
> =VxRQ
>
-----END PGP SIGNATURE-----
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>