-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi, i have a problem with the session on weblogic 12c. The applicacion doesn't redirect when timeout, the same page (zul) freeze for hours or days, and can't kill the session. The servlet configuration on my web.xml is:
<listener>
<description>
Used to cleanup when a session is destroyed</description>
<display-name>ZK Session cleaner</display-name>
<listener-class>org.zkoss.zk.ui.http.HttpSessionListener</listener-class>
</listener>
<servlet>
<description>The 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>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<description>
The asynchronous update engine for ZK</description>
<servlet-name>auEngine</servlet-name>
<servlet-class>org.zkoss.zk.au.http.DHtmlUpdateServlet</servlet-class>
</servlet>
previosly on weblogic 11g, the configuration works with this:
<listener>
<description>
Used to cleanup when a session is destroyed</description>
<display-name>ZK Session cleaner</display-name>
<listener-class>org.zkoss.zk.ui.http.HttpSessionListener</listener-class>
</listener>
<servlet>
<description>
The 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>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<description>
The asynchronous update engine for ZK</description>
<servlet-name>auEngine</servlet-name>
<servlet-class>org.zkoss.zk.au.http.DHtmlUpdateServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>zkLoader</servlet-name>
<url-pattern>*.zul</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>zkLoader</servlet-name>
<url-pattern>*.zhtml</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>auEngine</servlet-name>
<url-pattern>/zkau/*</url-pattern>
</servlet-mapping>
but now, not redirect automatically to logout on weblogic 12c.
zk.xml
<device-config>
<device-type>ajax</device-type>
<timeout-message>time out.</timeout-message>
<timeout-uri>/timeout.zul</timeout-uri><!-- An empty URL can cause the browser to reload the same URL -->
<automatic-timeout>true</automatic-timeout>
</device-config>
You have to place the timeout configuration elements into a <session-config>
element in. It looks like you accidentally used <device-config>
(which should also fail in any other application server, like tomcat/jetty/wildfly/glassfish/...)
<session-config>
<device-type>ajax</device-type>
<timeout-message>time out.</timeout-message>
<timeout-uri>/timeout.zul</timeout-uri><!-- An empty URL can cause the browser to reload the same URL -->
<automatic-timeout>true</automatic-timeout>
</session-config>
Related documentation:
<session-config>
Element
(and subpages)In case you copy pasted your configuration snipped from somewhere in our documentation please provide the location so we can fix it.
@cor3000 thanks a lot, I had not seen that. I have always used <device-config>
, that generates zk studio plugin on ecliplse, and always on all my applications i use that, and i never had problems with the session.
Asked: 2019-10-15 04:17:45 +0800
Seen: 16 times
Last updated: Oct 16 '19