0

GZIP header missing

asked 2011-05-05 09:03:05 +0800

huubf gravatar image huubf
69 1

updated 2011-05-18 02:38:19 +0800

We use ZK 3.6.4 on Tomcat 6.0.26
The site works 70% of the requests.

-Sometimes the browser wants to save the file or
-sometimes we get javascript errors from ZK scripts while loading the page
-sometimes binary tokens show up.

We found that this happens because main ZUL file or one one the javascript files the header Content-Encoding gzip is missing.

We decided to disable all compressing on ZK. This type of error is now partly gone.
We disabled compressing on ZUL JS DSP but still a"part of the page is rendered as binary tokens.

We feel that ZK does not do this correctly.
Or else how can it be caused by our application?


Basically there are two pages
1: /paramfile/index.zul?number=1
<zscript>

String id = Executions.getCurrent().getParameter("id");
session.setAttribute("id",id);
Executions.sendRedirect("/");
</zscript>


2: /secure/index.zul
<zscript>
session.getAttribute();
</zscript>


This works OKE, but like i said, not all the time.


Does anyone know what can `e the cause of this?


Regards, Huub

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2011-05-18 04:25:07 +0800

huubf gravatar image huubf
69 1

I was too fast to conclude that all issues concerning compressing are now gone.

So my question is:

Wat must i do to completely disable ZK compressing on a webapp?

so far i tried the following

/webapp/app/WEB-INF/web.xml

<servlet>
<description>The asynchronous update engine for ZK</description>
<servlet-name>auEngine</servlet-name>
<servlet-class>org.zkoss.zk.au.http.DHtmlUpdateServlet</servlet-class>
<init-param>
<param-name>compress</param-name>
<param-value>false</param-value>
</init-param>
</servlet>

<servlet>
<description>ZK loader for ZUML pages</description>
<servlet-name>zkLoader</servlet-name>
<servlet-class>org.zkoss.zk.ui.http.DHtmlLayoutServlet</servlet-class>
<init-param>
<param-name>update-uri</param-name>
<param-value>/zkau</param-value>
</init-param>
<init-param>
<param-name>compress</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

maybe also set tomcat compressing off

tomcat\conf\server.xml

<Connector port="8090" protocol="HTTP/1.1"
connectionTimeout="20000"
compression="off"
redirectPort="8489" />

thanks for any ideas

link publish delete flag offensive edit

answered 2011-05-19 06:58:32 +0800

huubf gravatar image huubf
69 1

updated 2011-05-19 07:00:40 +0800

Well,
Everything works now including all compression, and everybody was right not to have any ideas.

Because analysing the code revealed a Javascript bug.

We could reproduce the errors if the bug was introduced again.


So. I'd like to add to this lonely discussion that it is absolutely possible to break ZK's lifeclycle, if you create an error in your javascript.

This ends the issue.


Regards, Huub

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2011-05-05 09:03:05 +0800

Seen: 306 times

Last updated: May 19 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More