-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3848041
By: uday31in
I updated my web.xml as described in a tutorial.
My JSP is :
-- START OF JSP ----
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:x="http://www.potix.com/2005/zk" lang="en"> <% String msg = "Hello, World!"; %>
<x:window title="1st window" border="normal" width="200px"> </x:window>
<!-- This works file but NO GUI
<window title="1st window" border="normal" width="200px">
<%= msg %>
</window>
-->
</html>
--- END of JSP ---
If I enable only the commented protion then I can see the page but not GUI.
I can see only "Hello World!" as a text only.
If I run the code with <x:window> tag then it is giving me an exception.
--- Start 0f Exception ---
- Servlet.service() for servlet jsp threw exception
com.potix.zk.ui.UiException: Unknown ZK component: [Element: <x:window [http://www.potix.com/2005/zk] title="1st window" border="normal"
width="200px"/>]
at com.potix.zk.ui.metainfo.Parser.parse(Parser.java:451)
at com.potix.zk.ui.metainfo.Parser.parse(Parser.java:341)
at com.potix.zk.ui.metainfo.Parser.parse(Parser.java:506)
at com.potix.zk.ui.metainfo.Parser.parse(Parser.java:172)
at com.potix.zk.ui.metainfo.Parser.parse(Parser.java:110)
at com.potix.zk.ui.metainfo.PageDefinitions.getPageDefinitionDirectly(PageDefin
itions.java:76)
at com.potix.zk.ui.metainfo.PageDefinitions.getPageDefinitionDirectly(PageDefin
itions.java:57)
at com.potix.zk.ui.impl.AbstractUiFactory.getPageDefinitionDirectly(AbstractUiF
actory.java:81)
at com.potix.zk.ui.http.DHtmlLayoutFilter.process(DHtmlLayoutFilter.java:91)
at com.potix.zk.ui.http.DHtmlLayoutFilter.doFilter(DHtmlLayoutFilter.java:110)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
onnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:684)
at java.lang.Thread.run(Unknown Source)
--- End of Exception ---
Please Help me !!!!!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3848432
By: henrichen
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:x="http://www.potix.com/2005/zul"
zk -> zul
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3848853
By: uday31in
Thanks for the reply.
It is working fine now but Now i cant use the <zscript> tag.
My code is as below:
---- START of JSP ----
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:x="http://www.potix.com/2005/zul"
xmlns:zk="http://www.potix.com/2005/zk" lang="en"> <% String msg = "Hello, World!"; %>
<x:window id="top" title="1st window" border="normal" width="200px">
<!--
I CANT USE ZSCRIPT TAG. IF I USE WITHOUT ZK: IT IS GIVING ME AN ERROR.
WHEN I AM TRYING TO USE WITH ZK: THEN RESULT IS THE SAME. i CAN NOT SEE ANY THING
<zk:zscript>
com.potix.zul.html.Window w = new com.potix.zul.html.Window();
w.setTitle("Window Title");
w.setBorder("normal");
w.setWidth("200px");
com.potix.zul.html.Textbox t = new com.potix.zul.html.Textbox("pandya");
t.setParent(w);
</zk:zscript>
-->
<%= msg %>
</x:window>
</html>
--- End of jsp.
I tried to include the "ZK" name space as well. but After that I can not see any thing. NO TEXT NO GUI.
When i am using the zscript with the ZUL name space (in my code which is <x:zscript>) It is giving me the following error.
---- start of exception ----
- Servlet.service() for servlet jsp threw exception
com.potix.zk.ui.metainfo.DefinitionNotFoundException: Component definition not
found: zscript in [LanguageDefinition: xul/html]
at com.potix.zk.ui.metainfo.Parser.parse(Parser.java:469)
at com.potix.zk.ui.metainfo.Parser.parse(Parser.java:341)
at com.potix.zk.ui.metainfo.Parser.parse(Parser.java:506)
at com.potix.zk.ui.metainfo.Parser.parse(Parser.java:341)
at com.potix.zk.ui.metainfo.Parser.parse(Parser.java:506)
at com.potix.zk.ui.metainfo.Parser.parse(Parser.java:172)
at com.potix.zk.ui.metainfo.Parser.parse(Parser.java:110)
at com.potix.zk.ui.metainfo.PageDefinitions.getPageDefinitionDirectly(PageDefin
itions.java:76)
at com.potix.zk.ui.metainfo.PageDefinitions.getPageDefinitionDirectly(PageDefin
itions.java:57)
at com.potix.zk.ui.impl.AbstractUiFactory.getPageDefinitionDirectly(AbstractUiF
actory.java:81)
at com.potix.zk.ui.http.DHtmlLayoutFilter.process(DHtmlLayoutFilter.java:91)
at com.potix.zk.ui.http.DHtmlLayoutFilter.doFilter(DHtmlLayoutFilter.java:110)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
onnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:684)
at java.lang.Thread.run(Unknown Source)
--- end of Exception ---
Please help me.
Thanks.
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3850750
By: henrichen
<zk:zscript> is the correct way.
1. The zscript is simply a way for you to run java code. Put it inside <x:window> does not make it too different.
2. In your zscript you create a Window component "w" but does not link it to page or other parent component. So virtually, the window is created and going no where. You have to do w.setParent(top) or w.setPage(page) to make it appear.
/henri
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3854963
By: nobody
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:x="http://www.potix.com/2005/zul"
xmlns:zk="http://www.potix.com/2005/zk" lang="en"> <%
out.println("Hello World");
%>
<x:window id="top" title="1st window" border="normal" width="200px">
<x:label value="Hello"/>
</x:window>
</html>
i wrote these code, i can not see any window,but "Hello world" in my browser
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3855704
By: henrichen
The code looks ok. Can you check the generated source code in browser? What happens to the <x:..>?
/henri
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3855711
By: nobody
in my client browser,i check the source file:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:x="http://www.potix.com/2005/zul"
xmlns:zk="http://www.potix.com/2005/zk" lang="en"> Hello World
<x:window id="top" title="1st window" border="normal" width="200px"> <x:label value="Hello"/> </x:window>
</html>
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3856303
By: henrichen
Looks the ZK filter did not get the change to post process your jsp file. The
<x: ...> did not generate into HTML. You might have to take a look of the web.xml of your app.
/henri
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3857210
By: nobody
Thank you very much! you are right, now i correct it
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3862980
By: nobody
...I followed this thread because I faced the same problem. Actually I still have it. :-( Would you be so kind to point me in the right direction? What needs to be done in the web.xml to be able to include zk tags in a JSP?
thx in advance.
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3863998
By: nobody
Never mind - I found it out by myself...stupid me.
Asked: 2006-08-01 17:59:01 +0800
Seen: 200 times
Last updated: Aug 11 '06