- Action中定义赋值:
ActionContext ctx = ActionContext.getContext();
ctx.getApplication().put("simon", "23");
ctx.getSession().put("kitty", "12");
ctx.put("lucy", "12");
- 在JSP中调用:
${ applicationScope.simon }
${ sessionScope.kitty }
${ requestScope.lucy }
ActionContext ctx = ActionContext.getContext();
ctx.getApplication().put("simon", "23");
ctx.getSession().put("kitty", "12");
ctx.put("lucy", "12");
${ applicationScope.simon }
${ sessionScope.kitty }
${ requestScope.lucy }