You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Kaspar Fischer <fi...@inf.ethz.ch> on 2008/01/12 03:44:45 UTC

[Slightly OT] GZIP compression filter and java.lang.IllegalStateException: Cannot create a session...

Hi,

I've tried to install a compression filter and followed

   http://www.nabble.com/-slight-OT--GZip-compression-filter- 
td6901991.html

for this.

When I load my page, I get an exception (see below) about a OGNL  
expression
that could not be parsed and "Cannot create a session after the  
response has
been committed". (It works without the GZIP compression.)

My configuration is:

<web-app>
   <!-- lots of other stuff -->
   <filter>
   <filter-name>CompressingFilter</filter-name>
   <filter- 
class>com.planetj.servlet.filter.compression.CompressingFilter</ 
filter-class>
   <!-- Adobe's plugin for IE chokes on gzip'ed PDFs -->
   <init-param>
    <param-name>excludeContentTypes</param-name>
    <param-value>application/pdf</param-value>
   </init-param>
   <init-param>
    <param-name>excludePathPatterns</param-name>
    <param-value>.*\.pdf</param-value>
   </init-param>
  </filter>

  <filter-mapping>
   <filter-name>CompressingFilter</filter-name>
   <url-pattern>/*</url-pattern>
   <dispatcher>REQUEST</dispatcher>
  </filter-mapping>
</web-app>

Does anybody know how I can fix this?

Thanks in advance!
Kaspar

P.S. I post (see link above) also mentions code; I have not changed/ 
added
any code. Should I have done?

--

javax.servlet.ServletException: Unable to parse OGNL expression  
'loginSession.isLoggedIn()': loginSession

org.apache.hivemind.ApplicationRuntimeException: Unable to parse OGNL  
expression 'loginSession.isLoggedIn()': loginSession
    location: context:/WEB-INF/Border.html, line 121

org.apache.tapestry.BindingException: Unable to parse OGNL expression  
'loginSession.isLoggedIn()': loginSession
    binding: ExpressionBinding[null loginSession.isLoggedIn()]
    location: context:/WEB-INF/Border.html, line 121

org.apache.hivemind.ApplicationRuntimeException: Unable to parse OGNL  
expression 'loginSession.isLoggedIn()': loginSession

ognl.OgnlException: loginSession

java.lang.IllegalStateException: Cannot create a session after the  
response has been committed
org.apache.catalina.connector.Request.doGetSession(Request.java:2221)
org.apache.catalina.connector.Request.getSession(Request.java:2031)
org.apache.catalina.connector.RequestFacade.getSession 
(RequestFacade.java:832)
org.apache.tapestry.web.ServletWebRequest.getSession 
(ServletWebRequest.java:81)
...

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


Re: [Slightly OT] GZIP compression filter and java.lang.IllegalStateException: Cannot create a session...

Posted by Kaspar Fischer <fi...@inf.ethz.ch>.
For the sake of completeness: I've solved this by enabling Tomcat  
5.5's GZIP
compression in server.xml:

     <Connector acceptCount="100" connectionTimeout="20000"  
disableUploadTimeout="true" enableLookups="false"  
maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150"  
minSpareThreads="25" port="8080" redirectPort="8443"

			   compression="on"
			   compressionMinSize="2048"
			   noCompressionUserAgents="gozilla, traviata"
			   compressableMimeType="text/html,text/xml" />

On 12.01.2008, at 03:44, Kaspar Fischer wrote:

> Hi,
>
> I've tried to install a compression filter and followed
>
>   http://www.nabble.com/-slight-OT--GZip-compression-filter- 
> td6901991.html
>
> for this.
>
> When I load my page, I get an exception (see below) about a OGNL  
> expression
> that could not be parsed and "Cannot create a session after the  
> response has
> been committed". (It works without the GZIP compression.)
>
> My configuration is:
>
> <web-app>
>   <!-- lots of other stuff -->
>   <filter>
>   <filter-name>CompressingFilter</filter-name>
>   <filter- 
> class>com.planetj.servlet.filter.compression.CompressingFilter</ 
> filter-class>
>   <!-- Adobe's plugin for IE chokes on gzip'ed PDFs -->
>   <init-param>
>    <param-name>excludeContentTypes</param-name>
>    <param-value>application/pdf</param-value>
>   </init-param>
>   <init-param>
>    <param-name>excludePathPatterns</param-name>
>    <param-value>.*\.pdf</param-value>
>   </init-param>
>  </filter>
>
>  <filter-mapping>
>   <filter-name>CompressingFilter</filter-name>
>   <url-pattern>/*</url-pattern>
>   <dispatcher>REQUEST</dispatcher>
>  </filter-mapping>
> </web-app>
>
> Does anybody know how I can fix this?
>
> Thanks in advance!
> Kaspar
>
> P.S. I post (see link above) also mentions code; I have not changed/ 
> added
> any code. Should I have done?
>
> --
>
> javax.servlet.ServletException: Unable to parse OGNL expression  
> 'loginSession.isLoggedIn()': loginSession
>
> org.apache.hivemind.ApplicationRuntimeException: Unable to parse  
> OGNL expression 'loginSession.isLoggedIn()': loginSession
>    location: context:/WEB-INF/Border.html, line 121
>
> org.apache.tapestry.BindingException: Unable to parse OGNL  
> expression 'loginSession.isLoggedIn()': loginSession
>    binding: ExpressionBinding[null loginSession.isLoggedIn()]
>    location: context:/WEB-INF/Border.html, line 121
>
> org.apache.hivemind.ApplicationRuntimeException: Unable to parse  
> OGNL expression 'loginSession.isLoggedIn()': loginSession
>
> ognl.OgnlException: loginSession
>
> java.lang.IllegalStateException: Cannot create a session after the  
> response has been committed
> org.apache.catalina.connector.Request.doGetSession(Request.java:2221)
> org.apache.catalina.connector.Request.getSession(Request.java:2031)
> org.apache.catalina.connector.RequestFacade.getSession 
> (RequestFacade.java:832)
> org.apache.tapestry.web.ServletWebRequest.getSession 
> (ServletWebRequest.java:81)
> ...
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


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