0

Problem session with weblogic 12c

asked 2019-10-15 04:17:45 +0800

alexamm gravatar image alexamm
17 2

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>
delete flag offensive retag edit

2 Answers

Sort by » oldest newest most voted
1

answered 2019-10-15 10:37:03 +0800

cor3000 gravatar image cor3000
4887 2 7
ZK Team

updated 2019-10-15 10:38:30 +0800

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:

In case you copy pasted your configuration snipped from somewhere in our documentation please provide the location so we can fix it.

link publish delete flag offensive edit
0

answered 2019-10-16 05:45:06 +0800

alexamm gravatar image alexamm
17 2

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

link publish delete flag offensive edit
Your answer
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
1 follower

RSS

Stats

Asked: 2019-10-15 04:17:45 +0800

Seen: 15 times

Last updated: Oct 16

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