Score
0
Watch 3K Star 6.5K Fork 3.2K

卓源软件 / JeeSite 4.xJavaAGPL-3.0

weblogic下jstl标签写法不支持的问题

Open
叹 冰  Opened this issue

该问题是怎么引起的?

旧版本jeesite框架,从tomcat容器更换weblogic11容器,jsp上的一些标签的写法不支持了

比如 jsp上这句代码:var user11 = ${fns:getUser().isAdmin()};
getUser()返回的是一个实体对象,isAdmin()是为了执行该对象内部的一个方法,这种写法会报异常:
Syntax error in expression. Encountered "(". Expected one of : "}", ".", "[", ">", "gt", "<", "lt", ">=", "ge", "<=", "le", "==", "eq", "!=", "ne", "&&", "and", "||", "or", "*", "+", "-", "?", "/", "div", "%", "mod",
更换成对象的一个属性值就不会报异常了,比如var user11 = ${fns:getUser().isAdmin};
看起来weblogic不支持调用对象的方法?是否有其他写法能够代替呢?

重现步骤

部署到weblogic下之后,打开某些带标签的页面

报错信息

Syntax error in expression. Encountered "(". Expected one of : "}", ".", "[", ">", "gt", "<", "lt", ">=", "ge", "<=", "le", "==", "eq", "!=", "ne", "&&", "and", "||", "or", "*", "+", "-", "?", "/", "div", "%", "mod",
var user11 = ${fns:getUser().isAdmin()};
^

at weblogic.servlet.jsp.JavelinxJSPStub.reportCompilationErrorIfNeccessary(JavelinxJSPStub.java:226)
at weblogic.servlet.jsp.JavelinxJSPStub.compilePage(JavelinxJSPStub.java:162)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:256)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:216)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:244)
Truncated. see log file for complete stacktrace
total 1 participants

Comments (0)

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority

Help Search