摘要
基于HTTP传输协议的Web网页中,采用嵌入Commons-fileup load组件的Struts2框架,实现了文件的上传与下载.利用OGNL表达式提取Session持久层中的文件名,并利用此文件名实现下载文件的动态更名.灵活利用struts2.0自身提供的字段类型,提高下载的鲁棒性.并列举实例体现整合技术和动态文件下载的实用性,最后通过与以往2种常用开发框架的对比数据加以验证说明.
In the web page based on Hypertext Transfer Protocol,Struts2 embedded with commons-fileupload component is adopted to carry out the file uploads and file downloads.OGNL is used to extract the file name in the Session persistence layer,and this extracted file name is used to realize the function of renaming the downloaded files dynamically.In order to enhance the robustness of procedure download,we make use of struts2.0's own field types flexibly.Meanwhile,some examples are provided to reflect the applicability of the integrated technology and dynamic file download.Finally,the applicability is verified through comparing data with two previous common frameworks.
出处
《应用科技》
CAS
2011年第4期39-43,共5页
Applied Science and Technology