Getting Started

The JUEL distribution contains the following JAR files:

  1. juel-api-2.2.x.jar - contains the javax.el API classes.
  2. juel-impl-2.2.x.jar
  3. juel-spi-2.2.x.jar
  1. Factory and Context

    // the ExpressionFactory implementation is de.odysseus.el.ExpressionFactoryImpl
    ExpressionFactory factory = new de.odysseus.el.ExpressionFactoryImpl(); // package de.odysseus.el.util provides a ready-to-use subclass of ELContext
    de.odysseus.el.util.SimpleContext context = new de.odysseus.el.util.SimpleContext();
  2. Functions and Variables
    // map function math:max(int, int) to java.lang.Math.max(int, int)
    context.setFunction("math", "max", Math.class.getMethod("max", int.class, int.class)); // map variable foo to 0
    context.setVariable("foo", factory.createValueExpression(0, int.class));
  3. Parse and Evaluate
    // parse our expression
    ValueExpression e = factory.createValueExpression(context, "${math:max(foo,bar)}", int.class); // set value for top-level property "bar" to 1
    factory.createValueExpression(context, "${bar}", int.class).setValue(context, 1); // get value for our expression
    System.out.println(e.getValue(context)); // --> 1

Juel Getting Started的更多相关文章

  1. Juel 表达式使用

    JUEL 包的结构例如以下: 1.1.1. Juel maven仓库配置 眼下最新的版本号是2.2.7.使用的时候在pom.xml中加入仓库坐标就可以. <dependency> < ...

  2. 异常:java.lang.LinkageError: loader constraint violation: when resolving interface method

    异常:java.lang.LinkageError: loader constraint violation: when resolving interface method "javax. ...

  3. 研究base64_encode的算法

    从网上看了一些资料,为了方便自己理解,于是把它的编码原理,自己放在excel表格中清晰列出来,方便以后查阅.做的图如下:

  4. Tomcat6环境JBPM4.4报错:java.lang.ClassNotFoundException: de.odysseus.el.util.SimpleResolver

    Tomcat6环境JBPM4.4报错:java.lang.ClassNotFoundException: de.odysseus.el.util.SimpleResolver 报错信息:

  5. SSH整合JBPM4.4

    第一步:导入所需jar包: 所需的jar包(使用了hibernate annotation和struts2的convention-plugin,可能有多余的包,没做清理): 第二步:修改jbpm配置文 ...

  6. Jbpm4.4+hibernate3.5.4+spring3.0.4+struts2.1.8整合例子(附完整的请假流程例子,jbpm基础,常见问题解决)

    Jbpm4.4+hibernate3.5.4+spring3.0.4+struts2.1.8 整合例子(附完整的请假流程例子). 1.jbpm4.4 测试环境搭建 2.Jbpm4.4+hibernat ...

  7. Java框架----SSH整合回顾

    1,新建工程,类型为Web Project,设置默认编码为UTF-8,并创建如下文件夹 1,Source Folder 1,src 项目源码 2,config 配置文件 3,test 单元测试 2,普 ...

  8. BPMN2新规范与Activiti5

    上世纪九十年代以后,随着WfMC联盟的成立,BPM市场群雄逐鹿如火如荼,工作流技术得到了突飞猛进的发展,其中IBM.Oracle等大型软件厂商在工作流领域各扯大旗割据一方.2011年BPMN2.0新规 ...

  9. JBPM4.4部署到tomcat6异常解决办法

    java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.ser ...

随机推荐

  1. java获取本机器的IP(linux和windows)

    目录 描述 方案描述 获取Windows下的IP 获取linux下的IP 判断操作系统的类型 最后将上面三个方法进行整合 参考 描述 由于项目是部署在集群上的,需要项目能够自动采集各机器的信息.jav ...

  2. PHP全局变量局部变量

    http://www.w3school.com.cn/php/php_variables.asp

  3. web相关基础知识4

      一.定位的盒子居中 Css可见性 overflow: hidden;   溢出隐藏   常用在超出盒子之后就隐藏 visibility: hidden;   隐藏元素    隐藏之后还占据原来的位 ...

  4. [剑指Offer] 22.从上往下打印二叉树

    [思路]广度优先遍历,队列实现 class Solution { public: vector<int> PrintFromTopToBottom(TreeNode* root) { qu ...

  5. div加了float后 四个特性

    1.宽度变成0 2.左漂浮 或者右漂浮 3.后面的标签占据原来的位置 4对前面的div没有影响 他会浮动到前面div下面

  6. Netscaler工作流程

    Netscaler工作流程 http://blog.51cto.com/caojin/1898310 Citrix Netscaler有很多功能模块来满足应用交付的需求,为了能够做好的配置和排错工作, ...

  7. BZOJ2729 [HNOI2012]排队 【高精 + 组合数学】

    题目链接 BZOJ2729 题解 高考数学题... 我们先把老师看做男生,女生插空站 如果两个老师相邻,我们把他们看做一个男生,女生插空站 对于\(n\)个男生\(m\)个女生的方案数: \[n!m! ...

  8. Patch Windows with SSM on AWS

    ec2ssmupdate https://docs.amazonaws.cn/systems-manager/latest/userguide/systems-manager-patch.htmlht ...

  9. vue双向绑定原理

    要了解vue的双向绑定原理,首先得了解Object.defineProperty()方法,因为访问器属性是对象中的一种特殊属性,它不能直接在对象中设置,而必须通过 Object.definePrope ...

  10. js密码的匹配正则

    匹配的密码是 数字大写或者小写的字母.符号. if(pwd.match(/[\d]/) && pwd.match(/[A-Za-z]/) && pwd.match(/[ ...