💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## 代码 session: ~~~ public class HelloAction extends ActionSupport { public String index() { ActionContext context = ActionContext.getContext(); Map<String, Object> session = context.getSession(); session.put("name", "jack"); return SUCCESS; } } ~~~ <s:property value="#session.name"></s:property> ~~~ application: ~~~ ActionContext context = ActionContext.getContext(); Map<String, Object> application = context.getApplication(); application.put("name", "jack"); return SUCCESS; ~~~ <s:property value="#application.name"></s:property> <s:property value="#attr.name"></s:property> //使用attr也能获取到 ~~~ 使用自定义key: ~~~ ActionContext context = ActionContext.getContext(); context.put("name","jack"); return SUCCESS; ~~~ ~~~ <s:property value="#name"></s:property> ~~~