Java 如何在GoogleAppEngine中将值从action传递到jsp?

Java 如何在GoogleAppEngine中将值从action传递到jsp?,java,google-app-engine,struts2,Java,Google App Engine,Struts2,我想将我的动作中的en值传递到googleappengine中的结果jsp文件。 适用于java和strut2.1.8.1的谷歌应用程序引擎1.4.3 在我的指导下,我已经修复了ongl侦听器 在我的行动中: public String execute() { ActionContext.getContext().getValueStack().set("user", "LovelyCat"); return "success"; } 结果页面是这个jsp页面,我尝试在其中获取

我想将我的动作中的en值传递到googleappengine中的结果jsp文件。 适用于java和strut2.1.8.1的谷歌应用程序引擎1.4.3

在我的指导下,我已经修复了ongl侦听器

在我的行动中:

public String execute()
{
    ActionContext.getContext().getValueStack().set("user", "LovelyCat");
    return "success";
}
结果页面是这个jsp页面,我尝试在其中获取“user”:


但名称为空,不打印任何内容。
伙计们,请帮帮我。

用struts的方法。只需在action类属性中设置值,然后在JSP中使用struts标记访问它,如

行动类:

public String execute()
{
   this.setUser("LovelyCat");
   return "success";
}
在JSP中:

<s:property value="user"/>

使用此

public String execute() {
    ActionContext.getContext().put("user", "LovelyCat");
    return SUCCESS;
}
.jsp

<s:property value="user" />
<s:property value="user" />
${user}