0

Integrate with JSP, Servlets...

asked 2006-03-21 04:13:14 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3641486

By: tin_chen

I have add the zkFilter setting into web.xml:
<filter>
<filter-name>zkFilter</filter-name>
<filter-class>com.potix.zk.ui.http.DHtmlLayoutFilter</filter-class>
<init-param>
<param-name>extension</param-name>
<param-value>html</param-value>
<description>The extension to identify the content being post-processed by this filter. Default: html.</description>
</init-param>
</filter>
<filter-mapping>
<filter-name>zkFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>

And those are hello.jsp sample code:
<?xml version="1.0" encoding="UTF-8"?>
<%
String msg = "Hello, World!";
%>
<window title="1st window" border="normal" width="200px">
<%= msg %>
</window>

But I got those output:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<link rel="stylesheet" type="text/css"
href="/zkau/web/zul/css/normmoz_zh.css.dsp"/>
<script type="text/javascript">
zk_action="/zkau";
zk_desktopId="g4qn";
</script>
<script type="text/javascript" src="/zkau/web/js/zk/html/boot.js"
charset="UTF-8">
</script>
<window id="_pc1" width="200px" title="1st window" border="normal">
Hello, World!
</window>

The window zk tag didn't been parsed and transformed.
Could you give me some idea ??

Thanks very very much !!

delete flag offensive retag edit

5 Replies

Sort by ยป oldest newest

answered 2006-03-21 09:57:34 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3641822

By: tomyeh

You need to specify the XML name space as described in pp. 24, the developer's guide.

<x:window xmlns:x="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul
">
<x:combobox/>
...
</x:window>

Remember XHTML and XUL components are from different name spaces. You have to specify at least one of them if you mixed them in the same page. Otherwise, ZK loader has no idea to handle it.

link publish delete flag offensive edit

answered 2006-03-22 10:18:14 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3644102

By: nobody

Thank you very much, it works !!!

link publish delete flag offensive edit

answered 2006-04-10 19:06:02 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3679002

By: gladiator

I tried something like this in web.xml
<filter-name>zkFilter</filter-name>
<filter-class>com.potix.zk.ui.http.DHtmlLayoutFilter</filter-class>
<init-param>
<param-name>extension</param-name>
<param-value>html</param-value>
</init-param>
</filter>

<filter-mapping>
<filter-name>zkFilter</filter-name>
<url-pattern>/layout/*.jsp</url-pattern>
</filter-mapping>

then I get this error:
SEVERE: Parse error in application web.xml
java.lang.IllegalArgumentException: Invalid <url-pattern> /layout/*.jsp in filter mapping\

any idea?
thanks

link publish delete flag offensive edit

answered 2006-04-11 01:08:25 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3679917

By: tomyeh

According SRV.11.2 (pp 86, Servlet Spec), you can choose only from /x/y/* or *.z. No mix

link publish delete flag offensive edit

answered 2006-06-01 07:56:52 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3759007

By: nobody

you can try this /layout/*
But I also see other say it can not work becase Tomcat not support mapping chain very well.

link publish delete flag offensive edit
Your reply
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

RSS

Stats

Asked: 2006-03-21 04:13:14 +0800

Seen: 268 times

Last updated: Jun 01 '06

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