我需要执行以下操作:
- 用户登录。
- 重定向到欢迎屏幕。
- 在加载大量记录时查看欢迎屏幕。
- 重定向到工作屏幕。
我正在寻找一种在 Action 类中执行以下操作的方法:
public class LinkAction extends ActionSupport implements SessionAware {
@Autowired
private ServiceDelegate myService;
public String welcome()
{
new Runnable() {
@Override
public void run() {
myService.getLoadsOfData();
//redirect to the next action
}
}.run();
// this is where the user
// goes to look at the welcome screen
return "welcome";
}
}
可能这是一种错误的方法,如果是这样,请告诉我,我是 Struts 的新手。