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/05/29 12:35:14 UTC

Apache Tomcat hangs

Hello

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 .
After restart of the server then the tomcat runs fine.
Can anybody please tell me why does this happen?

Many thanks in advance,

Raquel


This is my error :

INFO: Server startup in 3207 ms
May 29, 2009 9:27:53 AM org.apache.jasper.runtime.JspFactoryImpl
internalGetPageContext
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)
        at org.apache.catalina.connector.Request.getSession(Unknown Source)
        at org.apache.catalina.connector.RequestFacade.getSession(Unknown
Source)
        at
javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
        at
org.apache.catalina.core.ApplicationHttpRequest.getSession(Unknown
Source)
        at
org.apache.catalina.core.ApplicationHttpRequest.getSession(Unknown
Source)
        at org.apache.jasper.runtime.PageContextImpl._initialize(Unknown
Source)
        at org.apache.jasper.runtime.PageContextImpl.initialize(Unknown
Source)
        at
org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(Unknown
Source)
        at org.apache.jasper.runtime.JspFactoryImpl.getPageContext(Unknown
Source)
        at
org.apache.jsp.jsp.Alarma_Detalle_jsp._jspService(Alarma_Detalle_jsp.java:37)
        at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.jasper.servlet.JspServletWrapper.service(Unknown
Source)
        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)
        at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.jasper.servlet.JspServletWrapper.service(Unknown
Source)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown
Source)
        at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
        at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
Source)
        at org.apache.catalina.core.StandardContextValve.invoke(Unknown
Source)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Unknown
Source)
        at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
        at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
        at org.apache.catalina.core.StandardEngineValve.invoke(Unknown
Source)
        at org.apache.catalina.connector.CoyoteAdapter.service(Unknown
Source)
        at org.apache.coyote.http11.Http11Processor.process(Unknown Source)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Unknown
Source)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Unknown
Source)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Unknown
Source)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
Source)
        at java.lang.Thread.run(Thread.java:595)





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Apache Tomcat hangs

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin,

Wow, you did a lot of work!

On 5/29/2009 8:47 AM, Martin Gainty wrote:
> but none of this *should happen if the jsp execution did'nt double submit* 
> relevant bits of your jsp code located at

What does this mean?

>>         at org.apache.jasper.runtime.JspFactoryImpl.getPageContext(Unknown
>> Source)
>>         at
>> org.apache.jsp.jsp.Alarma_Detalle_jsp._jspService(Alarma_Detalle_jsp.java:37)
>
> //Why is this code (re)referencing getPageContext

It's not. _initialize() is simply calling getSession() because the page
declared session="true" (or failed to declare session="false", since
it's the default).

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkogrXYACgkQ9CaO5/Lv0PDJRQCdG26EbqAvtIVaisXpqAbUPdMI
JeoAoJ+xrQFQYp+TszfKwS9AAOk4l73z
=rXL9
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Apache Tomcat hangs

Posted by Martin Gainty <mg...@hotmail.com>.
unwinding the stack
org.apache.jasper.runtime.PageContextImpl private void _initialize(Servlet servlet, ServletRequest request,
  127   			ServletResponse response, String errorPageURL,
  128   			boolean needsSession, int bufferSize, boolean autoFlush)
  129   			throws IOException {
.......
 143   		if (request instanceof HttpServletRequest && needsSession)
  144   			this.session = ((HttpServletRequest) request).getSession();
  145   		if (needsSession && session == null)
  146   			throw new IllegalStateException(
  147   					"Page needs a session and none is available");
which is called by org.apache.jasper.runtime.JspFactoryImpl internalGetPageContext
  89       private PageContext internalGetPageContext(Servlet servlet, ServletRequest request,
   90               ServletResponse response, String errorPageURL, boolean needsSession,
   91               int bufferSize, boolean autoflush) {
   92           try {
   93               PageContext pc;
   94               if (USE_POOL) {
   95                   PageContextPool pool = localPool.get();
   96                   if (pool == null) {
   97                       pool = new PageContextPool();
   98                       localPool.set(pool);
   99                   }
  100                   pc = pool.get();
  101                   if (pc == null) {
  102                       pc = new PageContextImpl();
  103                   }
  104               } else {
  105                   pc = new PageContextImpl();
  106               }
  107               pc.initialize(servlet, request, response, errorPageURL, 
  108                       needsSession, bufferSize, autoflush);
internalGetPageContext is referenced in the run method as shown 
148           public Object run() {
  149               return factory.internalGetPageContext(servlet, request, response,
  150                       errorPageURL, needsSession, bufferSize, autoflush);
  151           }
but none of this *should happen if the jsp execution did'nt double submit* 
relevant bits of your jsp code located at

>         at org.apache.jasper.runtime.JspFactoryImpl.getPageContext(Unknown
> Source)
>         at
> org.apache.jsp.jsp.Alarma_Detalle_jsp._jspService(Alarma_Detalle_jsp.java:37)
//Why is this code (re)referencing getPageContext

>         at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at org.apache.jasper.servlet.JspServletWrapper.service(Unknown
> Source)
>         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)

please display entire contents of
 $CATALINA_HOME/work/Catalina/localhost/WebAppName/org/apache/jsp/jsp/Alrama_Detallet_Service.jsp
Alarma_Detalle_jsp.java

Saludos Cordiales desde EEUU!
Martin Gainty 
GMT+5(esta semana)
______________________________________________ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Fri, 29 May 2009 12:35:14 +0200
> Subject: Apache Tomcat hangs
> From: rhernandez@evendor.es
> To: users@tomcat.apache.org
> 
> Hello
> 
> 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 .
> After restart of the server then the tomcat runs fine.
> Can anybody please tell me why does this happen?
> 
> Many thanks in advance,
> 
> Raquel
> 
> 
> This is my error :
> 
> INFO: Server startup in 3207 ms
> May 29, 2009 9:27:53 AM org.apache.jasper.runtime.JspFactoryImpl
> internalGetPageContext
> 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)
>         at org.apache.catalina.connector.Request.getSession(Unknown Source)
>         at org.apache.catalina.connector.RequestFacade.getSession(Unknown
> Source)
>         at
> javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
>         at
> org.apache.catalina.core.ApplicationHttpRequest.getSession(Unknown
> Source)
>         at
> org.apache.catalina.core.ApplicationHttpRequest.getSession(Unknown
> Source)
>         at org.apache.jasper.runtime.PageContextImpl._initialize(Unknown
> Source)
>         at org.apache.jasper.runtime.PageContextImpl.initialize(Unknown
> Source)
>         at
> org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(Unknown
> Source)
>         at org.apache.jasper.runtime.JspFactoryImpl.getPageContext(Unknown
> Source)
>         at
> org.apache.jsp.jsp.Alarma_Detalle_jsp._jspService(Alarma_Detalle_jsp.java:37)
>         at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at org.apache.jasper.servlet.JspServletWrapper.service(Unknown
> Source)
>         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)
>         at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at org.apache.jasper.servlet.JspServletWrapper.service(Unknown
> Source)
>         at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown
> Source)
>         at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
> Source)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
> Source)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
> Source)
>         at org.apache.catalina.core.StandardContextValve.invoke(Unknown
> Source)
>         at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Unknown
> Source)
>         at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
>         at org.apache.catalina.core.StandardEngineValve.invoke(Unknown
> Source)
>         at org.apache.catalina.connector.CoyoteAdapter.service(Unknown
> Source)
>         at org.apache.coyote.http11.Http11Processor.process(Unknown Source)
>         at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Unknown
> Source)
>         at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Unknown
> Source)
>         at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Unknown
> Source)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
> Source)
>         at java.lang.Thread.run(Thread.java:595)
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

_________________________________________________________________
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009

Re: Apache Tomcat hangs

Posted by Pid <pi...@pidster.com>.
On 23/08/2009 15:11, Len Popp wrote:
> 2009/8/23 Pid<pi...@pidster.com>:
>> On 23/08/2009 11:08, fps wrote:
>>>
>>> I got this kind of exception with a jsp defined with session="false" (in the
>>> <%@ page... %>    section at the top of the file) including another jsp which
>>> was not including that session="false" directive
>>>
>>
>> Which kind of exception?
>> Which version of Tomcat?
>> Which version of the JVM?
>> OS?
>> What do the logs say?
>
> fps was answering, not asking. The entire thread can be seen here:
> http://www.nabble.com/Apache-Tomcat-hangs-td23777681.html

My apologies - my mail server must be dropping messages...

p

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Apache Tomcat hangs

Posted by Len Popp <le...@gmail.com>.
2009/8/23 Pid <pi...@pidster.com>:
> On 23/08/2009 11:08, fps wrote:
>>
>> I got this kind of exception with a jsp defined with session="false" (in the
>> <%@ page... %>  section at the top of the file) including another jsp which
>> was not including that session="false" directive
>>
>
> Which kind of exception?
> Which version of Tomcat?
> Which version of the JVM?
> OS?
> What do the logs say?

fps was answering, not asking. The entire thread can be seen here:
http://www.nabble.com/Apache-Tomcat-hangs-td23777681.html
-- 
Len

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Apache Tomcat hangs

Posted by Pid <pi...@pidster.com>.
On 23/08/2009 11:08, fps wrote:
>
> I got this kind of exception with a jsp defined with session="false" (in the
> <%@ page... %>  section at the top of the file) including another jsp which
> was not including that session="false" directive
>

Which kind of exception?
Which version of Tomcat?
Which version of the JVM?
OS?
What do the logs say?


Please read the following, before replying:

  http://catb.org/~esr/faqs/smart-questions.html

OK?


p

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Apache Tomcat hangs

Posted by fps <fp...@semanlink.net>.
I got this kind of exception with a jsp defined with session="false" (in the
<%@ page... %> section at the top of the file) including another jsp which
was not including that session="false" directive

-- 
View this message in context: http://www.nabble.com/Apache-Tomcat-hangs-tp23777681p25101940.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Apache Tomcat hangs

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----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


Re: Apache Tomcat hangs

Posted by Raquel Hernández Martinez <rh...@evendor.es>.

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 
> 
> 


Re: Apache Tomcat hangs

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----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