【发布时间】:2012-04-30 09:24:49
【问题描述】:
我在返回的 JSP 中从我的 struts 2 操作访问方法时遇到问题。据我了解,如果我的操作看起来像这样:
public class HomeAction {
public String execute() {
return "SUCCESS";
}
public String getSomething() {
return "somethh";
}
}
然后我应该能够从 JSP 调用 ${something} 并返回 "somethh"。然而,这似乎不能正常工作。有没有我可能错过的明显配置?我正在使用 struts 2、spring 3.1 和 tomcat 7。
【问题讨论】: