title: zk framework: how to load zul pages from WEB-INF under directory zul
body: <p>I am using zk framework 6.
  I am trying to put my zul pages in /WEB-INF/zul directory.
  My index.zul file forwards the request to /WEB-INF/zul/login.zul which has a composer LoginComposer. 
  But when I am on login page I want to redirect the user to another page e.g. home.zul. But I am getting 404 error. </p>
  
  <p>Both login.zul and home.zul are in zul directory along with their respective composers.</p>
  
  <p>in loginComposer.java i have the following code to redirect to the home page which is called on a button click.</p>
  
  <pre><code> Execution exec = Executions.getCurrent();
                  HttpServletResponse response = (HttpServletResponse)exec.getNativeResponse();
                  response.sendRedirect(response.encodeRedirectURL("/WEB-INF/zul/home.zul")); //assume there is /login
                  exec.setVoided(true); 
  </code></pre>
  
  <p>I created the project as a zk project from eclipse and i made no changes to web.xml.</p>
  
  <p>please guide me how can i go from here.</p>
  
  <p>Thank in advance.</p>
  
  <p>web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"&gt;
    &lt;display-name&gt;abc&lt;/display-name&gt;
    &lt;listener&gt;
      &lt;description&gt;
      Used to cleanup when a session is destroyed&lt;/description&gt;
      &lt;display-name&gt;ZK Session cleaner&lt;/display-name&gt;
      &lt;listener-class&gt;org.zkoss.zk.ui.http.HttpSessionListener&lt;/listener-class&gt;
    &lt;/listener&gt;
    &lt;servlet&gt;
      &lt;description&gt;
      The ZK loader for ZUML pages&lt;/description&gt;
      &lt;servlet-name&gt;zkLoader&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.zkoss.zk.ui.http.DHtmlLayoutServlet&lt;/servlet-class&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;update-uri&lt;/param-name&gt;
          &lt;param-value&gt;/zkau&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
    &lt;servlet&gt;
      &lt;description&gt;
      The asynchronous update engine for ZK&lt;/description&gt;
      &lt;servlet-name&gt;auEngine&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.zkoss.zk.au.http.DHtmlUpdateServlet&lt;/servlet-class&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;zkLoader&lt;/servlet-name&gt;
      &lt;url-pattern&gt;*.zul&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;zkLoader&lt;/servlet-name&gt;
      &lt;url-pattern&gt;*.zhtml&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;auEngine&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/zkau/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;index.htm&lt;/welcome-file&gt;
      &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.htm&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.jsp&lt;/welcome-file&gt;
      &lt;welcome-file&gt;index.zul&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>zk.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;!--
      Created by ZK Studio
  --&gt;
  
  &lt;zk&gt;
  
          &lt;device-config&gt;
              &lt;device-type&gt;ajax&lt;/device-type&gt;
              &lt;timeout-uri&gt;/timeout.zul&lt;/timeout-uri&gt;&lt;!-- An empty URL can cause the browser to reload the same URL --&gt;
          &lt;/device-config&gt;
  
      &lt;/zk&gt;
  </code></pre>
  
  <p>LoginComposer.java</p>
  
  <pre><code>public class LoginComposer extends SelectorComposer&lt;Component&gt;{
  
      private static final long serialVersionUID = -1657004425904043268L;
  
      @Wire
      private Button buttontestButton;
  
      @Listen("onClick = #testButton")
      public void cancelButton(){
  
  
               Executions.sendRedirect("/WEB-INF/zul/home.zul");
  
  
      }
  }
  </code></pre>