---
title: "《研磨struts2》第十九章 进度条 之 19.1 使用“进度条”告知用户进度 "
author: "研磨struts2"
date: "2012-07-02T12:23:24Z"
tags: []
categories: ["企业架构"]
slug: "struts2-19-1"
draft: false
lastmod: "2012-07-02T12:23:24Z"
id: 1574170
url: "https://rubbing-struts2.iteye.com/blog/1574170"
---

## 19.1  使用“进度条”告知用户进度

            在第十七章中，使用令牌来解决了用户重复提交的问题。如果在运行一个长时间运行的任务的时候，使用“进度条”的方式来告知用户任务运行的进度，那么，用户也就不会频繁的点击按钮，从而导致重复提交了。

进度条在C/S的程序中相当常见，但是对于无状态的HTTP协议，该怎样来实现进度条的功能呢？

Struts2提供了execAndWait拦截器，通过它就可以简单的模拟“进度条”的功能了。

 

私塾在线网站原创《[研磨struts2](http://sishuok.com/forum/blogCategory/showByCategory.html?categories_id=81&user_id=5948)》系列

转自请注明出处：【[http://sishuok.com/forum/blogPost/list/0/4173.html](http://sishuok.com/forum/blogPost/list/0/4173.html)】

欢迎访问[http://sishuok.com](http://sishuok.com/)获取更多内容