AbstractProcessor
@Override
public void process(ActionContext ac) throws Throwable {
ac.getRequest().setAttribute("test", "test");
ac.getRequest().getSession().setAttribute("view", "view");
}
Module
@GET
@At("/test")
@Ok("jsp:test")
public void test() {
Mvcs.getReq().setAttribute("main", "main");
}
test jsp中
<body class="hold-transition ">
1:${main}
2:${test}
3:${view}
</body>
结果
1:main
2:
3:view
应该如何取得test值呢?感觉好像是执行顺序的原因导致取不到test值