1.wait.jsp
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<meta http-equiv="refresh" content="5;url=<s:url includeParams="all"/>"/>
</head>
<body>
<p style="border: 1px solid silver; padding: 5px; background: #ffd; text-align: center;">
We are processing your request. Please wait...
</p>
<p/>
You can click this link to <a href="<s:url includeParams="all"/>">refresh</a>.
</body>
</html>
2.WaitAction
public String execute() throws Exception {
Thread.sleep(8000);
return SUCCESS;
}
3.配置struts.xml
<action name="wait" class="com.test.action.WaitAction">
<interceptor-ref name="defaultStack"></interceptor-ref>
<interceptor-ref name="execAndWait"></interceptor-ref>
<result name="wait">/wait.jsp</result>
<result name="success">/success.jsp</result>
</action>
posted on 2008-05-08 10:49
长春语林科技 阅读(182)
评论(0) 编辑 收藏 所属分类:
struts2