You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mike Lenyon <mi...@lenyon.com> on 2003/05/10 17:10:12 UTC

Cannot create a session after the response has been committed

i tried adding session capability to an xsp but get an error when the page loads.

here's my xsp page, to which i have yet to add the actual session calls:
<?xml version="1.0" encoding="ISO-8859-1"?>

<xsp:page
    language="java"
    xmlns:xsp="http://apache.org/xsp"
    xmlns:xsp-request="http://apache.org/xsp/request/2.0"
    xmlns:xsp-session="http://apache.org/xsp/session/2.0"
    create-session="true"
    >
    
    <xsp:structure>
        <xsp:include>java.util.Map</xsp:include>
        <xsp:include>java.util.HashMap</xsp:include>
    </xsp:structure>
    
    <current-product>
        <request-uri><xsp-request:get-uri/></request-uri>
    </current-product>
</xsp:page>

here's a snippet from error.log:

java.lang.IllegalStateException: Cannot create a session after the response has been committed
 at org.apache.catalina.connector.HttpRequestBase.doGetSession(HttpRequestBase.java:1104)
 at org.apache.catalina.connector.HttpRequestBase.getSession(HttpRequestBase.java:1064)
 at org.apache.catalina.connector.HttpRequestFacade.getSession(HttpRequestFacade.java:209)
 at org.apache.cocoon.environment.http.HttpRequest.getSession(HttpRequest.java:227)

i searched around this problem appears to be reported as a bug.  if i am in fact running into a bug here, what do you suggest as a workaround?  i'm using tomcat 4.0.4, jdk 1.3.1, and cocoon 2.0.4, and i can't upgrade any of them.

thanks in advance.

Mike Lenyon

Re: Cannot create a session after the response has been committed

Posted by Mike Lenyon <mi...@lenyon.com>.
joerg,

you're right.  i needed to change to order of my sitemap items.  i really
appreciate your help!

Mike Lenyon
----- Original Message -----
From: "Joerg Heinicke" <jo...@gmx.de>
To: <co...@xml.apache.org>
Sent: Saturday, May 10, 2003 12:01 PM
Subject: Re: Cannot create a session after the response has been committed


> I guess, you have a problem in the sitemap, not in the XSP.
>
> Joerg
>
> Mike Lenyon wrote:
> > i tried adding session capability to an xsp but get an error when the
> > page loads.
> >
> > here's my xsp page, to which i have yet to add the actual session calls:
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> >
> > <xsp:page
> >     language="java"
> >     xmlns:xsp="http://apache.org/xsp"
> >     xmlns:xsp-request="http://apache.org/xsp/request/2.0"
> >     xmlns:xsp-session="http://apache.org/xsp/session/2.0"
> >     create-session="true"
> >     >
> >
> >     <xsp:structure>
> >         <xsp:include>java.util.Map</xsp:include>
> >         <xsp:include>java.util.HashMap</xsp:include>
> >     </xsp:structure>
> >
> >     <current-product>
> >         <request-uri><xsp-request:get-uri/></request-uri>
> >     </current-product>
> > </xsp:page>
> >
> > here's a snippet from error.log:
> >
> > java.lang.IllegalStateException: Cannot create a session after the
> > response has been committed
> >  at
> >
org.apache.catalina.connector.HttpRequestBase.doGetSession(HttpRequestBase.j
ava:1104)
> >  at
> >
org.apache.catalina.connector.HttpRequestBase.getSession(HttpRequestBase.jav
a:1064)
> >  at
> >
org.apache.catalina.connector.HttpRequestFacade.getSession(HttpRequestFacade
.java:209)
> >  at
> >
org.apache.cocoon.environment.http.HttpRequest.getSession(HttpRequest.java:2
27)
> >
> > i searched around this problem appears to be reported as a bug.  if i am
> > in fact running into a bug here, what do you suggest as a workaround?
> > i'm using tomcat 4.0.4, jdk 1.3.1, and cocoon 2.0.4, and i can't upgrade
> > any of them.
> >
> > thanks in advance.
> >
> > Mike Lenyon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>


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


Re: Cannot create a session after the response has been committed

Posted by Joerg Heinicke <jo...@gmx.de>.
I guess, you have a problem in the sitemap, not in the XSP.

Joerg

Mike Lenyon wrote:
> i tried adding session capability to an xsp but get an error when the 
> page loads.
>  
> here's my xsp page, to which i have yet to add the actual session calls:
> <?xml version="1.0" encoding="ISO-8859-1"?>
>  
> <xsp:page
>     language="java"
>     xmlns:xsp="http://apache.org/xsp"
>     xmlns:xsp-request="http://apache.org/xsp/request/2.0"
>     xmlns:xsp-session="http://apache.org/xsp/session/2.0"
>     create-session="true"
>     >
>    
>     <xsp:structure>
>         <xsp:include>java.util.Map</xsp:include>
>         <xsp:include>java.util.HashMap</xsp:include>
>     </xsp:structure>
>    
>     <current-product>
>         <request-uri><xsp-request:get-uri/></request-uri>
>     </current-product>
> </xsp:page>
>  
> here's a snippet from error.log:
> 
> java.lang.IllegalStateException: Cannot create a session after the 
> response has been committed
>  at 
> org.apache.catalina.connector.HttpRequestBase.doGetSession(HttpRequestBase.java:1104)
>  at 
> org.apache.catalina.connector.HttpRequestBase.getSession(HttpRequestBase.java:1064)
>  at 
> org.apache.catalina.connector.HttpRequestFacade.getSession(HttpRequestFacade.java:209)
>  at 
> org.apache.cocoon.environment.http.HttpRequest.getSession(HttpRequest.java:227)
>  
> i searched around this problem appears to be reported as a bug.  if i am 
> in fact running into a bug here, what do you suggest as a workaround?  
> i'm using tomcat 4.0.4, jdk 1.3.1, and cocoon 2.0.4, and i can't upgrade 
> any of them.
>  
> thanks in advance.
>  
> Mike Lenyon


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