0

How can i make Tomcat (with virtual hosts) to parse the zul page in subfolders?

asked 2013-04-23 15:30:55 +0800

lordrayden gravatar image lordrayden
3

I'm running ZK on a Apache Tomcat Server with virtual hosts. In my ZK project i've got subfolders in my WebContent. So my Problem is, that if i redirect to a zul page which is in a subfolder, that i only see the zul/xml content and not the parsed page. How can i make Tomcat to parse the zul page?

delete flag offensive retag edit

2 Answers

Sort by » oldest newest most voted
0

answered 2013-04-28 20:42:03 +0800

rdgrimes gravatar image rdgrimes
735 7

updated 2013-04-28 20:44:20 +0800

Tomcat does not parse ZUL pages. It routes them. If you will look at your web.xml, you should see that the zkLoader servlet is assigned to process *.zul pages. So, your real problem is to define the mappings so that the *.zul pages in the sub-directory get routed through servlet zkLoader. Obviously, this is not happening and so Tomcat is simply returning it in it's raw form. I recommend posting your web.xml and give more information as to your WebContent directory structure.

link publish delete flag offensive edit
0

answered 2013-04-29 00:03:52 +0800

lordrayden gravatar image lordrayden
3
    <display-name>DisplayName</display-name>
    <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>
    <welcome-file-list>
        <welcome-file>index.zul</welcome-file>
    </welcome-file-list>
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: 2013-04-23 15:30:55 +0800

Seen: 23 times

Last updated: Apr 29 '13

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