Realization of the Dynamic Tracking of File Upload in Struts2
HU Jie-ping · Journal of Beijing Institute of Graphic Communication · 2010
SSH(Struts+Spring+Hibernate) is the most popular technology framework.Realization file upload tracking function in the SSH is necessary for the development of Web application system.It is realized the file upload tracking function by research the principle of Struts2 upload file and Ajax technology.In the server side,firstly,expansing OutputStream class increases the monitoring function;secondly,expansing the two classes of OutpuDiskFileItem and DiskFileItemFactory in Common_FileUpload framework uses the new outputstream class with the monitoring function;finally,transforming the original parsing class MultiPartRequest in Struts2 uses the new factory class for realization file upload tracking.In the client side,Using AJAX technology obtains status information by issuing periodic requests to the Struts2 controller.Application shows that this method is convenient and feasible,and has a good effect.