Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-2649

Executions.sendRedirect() doesn't work when invoke them from .zhtml page

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 7.0.5
    • 7.0.4
    • None
    • Security Level: Jimmy
    • None
    • None

      Steps to Reproduce

      1. run attached zhtml page with initiator
        public class RedirectInit implements Initiator {
        
        	@Override
        	public void doInit(Page page, Map<String, Object> args) throws Exception {
        		
        		Executions.sendRedirect("target.zul");
        	}
        }
        

        web.xml

        	<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>
        
        		<load-on-startup>1</load-on-startup>
        	</servlet>
        	<servlet-mapping>
        		<servlet-name>zkLoader</servlet-name>
        		<url-pattern>*.zhtml</url-pattern>
        	</servlet-mapping>
        
      2. visit the zhtml page

      Actual Result

      The browser is not redirected to the target page.

      Debug Information

      5.0.0 and 5.0.1 doesn't have this issue.
      Since 5.0.2 has the issue.
      Initiator works correctly on a zul page.

            jumperchen jumperchen
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: