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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 7.0.4
    • Fix Version/s: 7.0.5
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: