以前用jfinal1.09写的小程序,可以直接升级成1.6的么?我换jar包出错了

Sakhr 发布于 2014/03/29 21:04
阅读 369
收藏 0

@JFinal 你好,想跟你请教个问题:

之前一个小博客用jfinal写的,用的是1.09的jar包,我今天把这个包换成1.6的,发现不能用了,怎么回事,求指导呀!

错误如下

Caused by: org.apache.jasper.JasperException: javax.el.MethodNotFoundException: Unable to find method [getPageNumber] with [0] parameters
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
at com.jfinal.render.JspRender.render(JspRender.java:56)
... 18 more
Caused by: javax.el.MethodNotFoundException: Unable to find method [getPageNumber] with [0] parameters
at javax.el.BeanELResolver.invoke(BeanELResolver.java:436)
at org.apache.jasper.el.JasperELResolver.invoke(JasperELResolver.java:139)
at org.apache.el.parser.AstValue.getValue(AstValue.java:173)
at org.apache.el.parser.AstLessThanEqual.getValue(AstLessThanEqual.java:38)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:185)
at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:1026)
at org.apache.jsp.home.Index_005findex_jsp._jspx_meth_c_005fwhen_005f0(Index_005findex_jsp.java:507)
at org.apache.jsp.home.Index_005findex_jsp._jspService(Index_005findex_jsp.java:314)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
... 31 more

加载中
0
秋阳
秋阳

提示是找不到 getPageNumber 的方法的 第一个参数,你看下是哪里用到了这个啊~

Sakhr
Sakhr
是在jsp页面获取不到这个数据,改下就行了,不解的是代码完全没变,用了1.6的jar就不行,1.09在jsp页面又能获取到
0
JFinal
JFinal
该评论暂时无法显示,详情咨询 QQ 群:点此入群
JFinal
JFinal
正确的用法是:redirect(url),或者 forwardAction(actionKey)
JFinal
JFinal
回复 @redtitan : 以前你肯定就误用了,index 方法是默认的,所以一般是这样 redirect("/") 或者 redirect(controllerKey),出现 rendirect("index") 的可能性只会是用了 @ActionKey("index")
Sakhr
Sakhr
波总,我还想问下那个redirect这个方法,比如我写一个TestController类,里面有2个方法一个是index(){renderJsp("a.jsp")},另一个是test(),以前我在test方法中可以直接redirect("index")这样让他这样跳转到了a.jsp,现在这个1.6不能这样了么
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部