0

pass parameter to a JSP page

asked 2006-04-28 14:45:20 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


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

By: nobody

Hi expert,

In my zul page, I have:
...
<include src="show.jsp?url=www.google.com" />
...

In my show.jsp page, I have:

...
<% String url = request.getParameter("url");

if (url == null) {
url = "http://www.yahoo.com";
}
%>
....

But I always got errors as below:

com.potix.zk.ui.UiException: com.potix.web.servlet.ServletException: Unable to evaluate an EL expression: ${u:redraw(root, null)}
com.potix.zk.ui.http.ServletExecution.forward(ServletExecution.java:130)
com.potix.zk.ui.sys.PageImpl.redraw(PageImpl.java:397)
com.potix.zk.ui.sys.UiEngineImpl.execNewPage(UiEngineImpl.java:242)
com.potix.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:320)
com.potix.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:282)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)


How can I pass parameter from zul page to JSP page? Can you show me a sample?

Thanks a lot!


delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2006-04-28 15:07:04 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


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

By: tomyeh

The way you pass parameter is correct. I doubt there is other issue. Did you have more complete log? Can you try to include another page or without ?url=...

Or you could put System.out in your JSP to see which step it failed?

link publish delete flag offensive edit

answered 2006-04-28 15:08:46 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


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

By: tomyeh

See also http://en.wikibooks.org/wiki/ZK/How-Tos#How_to_include_the_same_page_tw
ice.3F

link publish delete flag offensive edit

answered 2006-04-28 15:15:56 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


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

By: nobody

Thanks for response!

If I did not pass url, like
<include src="show.jsp" />

it would be working fine.

The more & complete log error is caught as:

Apr 28, 2006 10:44:00 AM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet auEngine threw exception
com.potix.zk.ui.UiException: com.potix.web.servlet.ServletException: Unable to evaluate an EL expression: ${u:redraw(child, null)}
at com.potix.zk.ui.http.ServletExecution.include(ServletExecution.java:113)
at com.potix.zk.ui.AbstractComponent.redraw(AbstractComponent.java:824)
at com.potix.zk.fn.ZkFns.redraw(ZkFns.java:82)
at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.commons.el.FunctionInvocation.evaluate(FunctionInvocation.java:17
2)
at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorIm
pl.java:263)
at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorIm
pl.java:190)
at com.potix.el.EvaluatorImpl.evaluate(EvaluatorImpl.java:71)
at com.potix.web.servlet.dsp.impl.ELNode.interpret(ELNode.java:47)
at com.potix.web.servlet.dsp.impl.ActionNode.renderFragment(ActionNode.java:98)
at com.potix.web.servlet.dsp.impl.ActionContextImpl.renderFragment(ActionContex
tImpl.java:94)
at com.potix.web.servlet.dsp.action.ForEach.renderWith(ForEach.java:145)
at com.potix.web.servlet.dsp.action.ForEach.render(ForEach.java:120)
at com.potix.web.servlet.dsp.impl.ActionNode.interpret(ActionNode.java:72)
at com.potix.web.servlet.dsp.impl.RootNode.interpret(RootNode.java:53)
at com.potix.web.servlet.dsp.impl.RootNode.interpret(RootNode.java:66)
at com.potix.web.util.resource.ClassWebResource.web(ClassWebResource.java:157)
at com.potix.web.util.resource.ClassWebResource.doGet(ClassWebResource.java:125
)
at com.potix.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:672)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java:574)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:499)
at com.potix.web.servlet.Servlets.include(Servlets.java:522)
at com.potix.web.servlet.dsp.impl.ActionContextImpl.include(ActionContextImpl.j
ava:102)
at com.potix.web.servlet.dsp.action.Include.render(Include.java:56)
at com.potix.web.servlet.dsp.impl.ActionNode.interpret(ActionNode.java:72)
at com.potix.web.servlet.dsp.impl.RootNode.interpret(RootNode.java:53)
at com.potix.web.servlet.dsp.impl.RootNode.interpret(RootNode.java:66)
at com.potix.web.util.resource.ClassWebResource.web(ClassWebResource.java:157)
at com.potix.web.util.resource.ClassWebResource.doGet(ClassWebResource.java:125
)
at com.potix.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDis
patcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
er.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
.java:301)
at com.potix.web.servlet.Servlets.forward(Servlets.java:463)
at com.potix.zk.ui.http.ServletExecution.forward(ServletExecution.java:124)
at com.potix.zk.ui.sys.PageImpl.redraw(PageImpl.java:397)
at com.potix.zk.ui.sys.UiEngineImpl.execNewPage(UiEngineImpl.java:242)
at com.potix.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:320)
at com.potix.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:282)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)
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(Thread.java:595)
Caused by: com.potix.web.servlet.ServletException: Unable to evaluate an EL
expression: ${u:redraw(child, null)}
at com.potix.web.servlet.dsp.impl.ELNode.interpret(ELNode.java:53)
at com.potix.web.servlet.dsp.impl.ActionNode.renderFragment(ActionNode.java:98)
at com.potix.web.servlet.dsp.impl.ActionContextImpl.renderFragment(ActionContex
tImpl.java:94)
at com.potix.web.servlet.dsp.action.ForEach.renderWith(ForEach.java:145)
at com.potix.web.servlet.dsp.action.ForEach.render(ForEach.java:120)
at com.potix.web.servlet.dsp.impl.ActionNode.interpret(ActionNode.java:72)
at com.potix.web.servlet.dsp.impl.RootNode.interpret(RootNode.java:53)
at com.potix.web.servlet.dsp.impl.RootNode.interpret(RootNode.java:66)
at com.potix.web.util.resource.ClassWebResource.web(ClassWebResource.java:157)
at com.potix.web.util.resource.ClassWebResource.doGet(ClassWebResource.java:125
)
at com.potix.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:672)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java:574)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:499)
at com.potix.web.servlet.Servlets.include(Servlets.java:517)
at com.potix.zk.ui.http.ServletExecution.include(ServletExecution.java:107)
... 66 more
Caused by: javax.servlet.jsp.el.ELException: An error occurred while evaluating function "u:redraw"
at org.apache.commons.el.Logger.logError(Logger.java:484)
at org.apache.commons.el.Logger.logError(Logger.java:545)
at org.apache.commons.el.FunctionInvocation.evaluate(FunctionInvocation.java:17
4)
at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorIm
pl.java:263)
at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorIm
pl.java:190)
at com.potix.el.EvaluatorImpl.evaluate(EvaluatorImpl.java:71)
at com.potix.web.servlet.dsp.impl.ELNode.interpret(ELNode.java:47)
... 85 more
Apr 28, 2006 10:44:00 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet zkLoader threw exception
com.potix.zk.ui.UiException: com.potix.web.servlet.ServletException: Unable to evaluate an EL expression: ${u:redraw(root, null)}
at com.potix.zk.ui.http.ServletExecution.forward(ServletExecution.java:130)
at com.potix.zk.ui.sys.PageImpl.redraw(PageImpl.java:397)
at com.potix.zk.ui.sys.UiEngineImpl.execNewPage(UiEngineImpl.java:242)
at com.potix.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:320)
at com.potix.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:282)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)
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(Thread.java:595)
Caused by: com.potix.web.servlet.ServletException: Unable to evaluate an EL
expression: ${u:redraw(root, null)}
at com.potix.web.servlet.dsp.impl.ELNode.interpret(ELNode.java:53)
at com.potix.web.servlet.dsp.impl.ActionNode.renderFragment(ActionNode.java:98)
at com.potix.web.servlet.dsp.impl.ActionContextImpl.renderFragment(ActionContex
tImpl.java:94)
at com.potix.web.servlet.dsp.action.ForEach.renderWith(ForEach.java:145)
at com.potix.web.servlet.dsp.action.ForEach.render(ForEach.java:120)
at com.potix.web.servlet.dsp.impl.ActionNode.interpret(ActionNode.java:72)
at com.potix.web.servlet.dsp.impl.RootNode.interpret(RootNode.java:53)
at com.potix.web.servlet.dsp.impl.RootNode.interpret(RootNode.java:66)
at com.potix.web.util.resource.ClassWebResource.web(ClassWebResource.java:157)
at com.potix.web.util.resource.ClassWebResource.doGet(ClassWebResource.java:125
)
at com.potix.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:672)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java:574)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:499)
at com.potix.web.servlet.Servlets.include(Servlets.java:522)
at com.potix.web.servlet.dsp.impl.ActionContextImpl.include(ActionContextImpl.j
ava:102)
at com.potix.web.servlet.dsp.action.Include.render(Include.java:56)
at com.potix.web.servlet.dsp.impl.ActionNode.interpret(ActionNode.java:72)
at com.potix.web.servlet.dsp.impl.RootNode.interpret(RootNode.java:53)
at com.potix.web.servlet.dsp.impl.RootNode.interpret(RootNode.java:66)
at com.potix.web.util.resource.ClassWebResource.web(ClassWebResource.java:157)
at com.potix.web.util.resource.ClassWebResource.doGet(ClassWebResource.java:125
)
at com.potix.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDis
patcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
er.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
.java:301)
at com.potix.web.servlet.Servlets.forward(Servlets.java:463)
at com.potix.zk.ui.http.ServletExecution.forward(ServletExecution.java:124)
... 20 more
Caused by: javax.servlet.jsp.el.ELException: An error occurred while evaluating function "u:redraw"
at org.apache.commons.el.Logger.logError(Logger.java:484)
at org.apache.commons.el.Logger.logError(Logger.java:545)
at org.apache.commons.el.FunctionInvocation.evaluate(FunctionInvocation.java:17
4)
at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorIm
pl.java:263)
at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorIm
pl.java:190)
at com.potix.el.EvaluatorImpl.evaluate(EvaluatorImpl.java:71)
at com.potix.web.servlet.dsp.impl.ELNode.interpret(ELNode.java:47)
... 56 more

link publish delete flag offensive edit

answered 2006-04-29 06:09:20 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


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

By: nobody

U can try with soem other varuable name may be "url" is some kind of keyword

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-04-28 14:45:20 +0800

Seen: 1,012 times

Last updated: Apr 29 '06

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