web.xml
| <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class> </filter> <filter-mapping> |
struts.xml
| <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> |
upload.jsp
|
<%...@ page language="java" contentType="text/html; charset=GB18030" <%...@ page language="java" contentType="text/html; charset=GB18030" package com.xie.struts.upload; import java.io.File; import org.apache.struts2.ServletActionContext; import com.opensymphony.xwork2.ActionSupport; public class UploadAction extends ActionSupport ...{ private File file; private String fileFileName; // 有属性file+Filename固定组成 private String fileContentType; // 有属性file+ContentType固定组成 public String getUsername() ...{ public void setUsername(String username) ...{ public File getFile() ...{ public void setFile(File file) ...{ public String getFileFileName() ...{ public void setFileFileName(String fileFileName) ...{ public String getFileContentType() ...{ public void setFileContentType(String fileContentType) ...{ @Override |
相关专题
- Struts框架应用专题 (481篇文章)
- 加速有理 迅雷超速下载13秘技 (218次浏览)
- 强悍!脱兔实用技巧大放送 (143次浏览)
- 快车VS迅雷 下载速度火拼实测 (107次浏览)
- DIY自己的绿色版迅雷下载 (33次浏览)
- 使用eMule电驴过程中常遇的10个问题及解决 (22次浏览)
- 轻轻松松批量下载相册中的照片 (22次浏览)
- 快车2.0 Beta 6新版发动BT提速革命 (19次浏览)
- P2P下载中 保护系统安全的五大步骤 (18次浏览)
- 教你自己动手制作绿色版迅雷 (17次浏览)
- 体验漫步家Pronto!的酷棒通和P2P功能 (15次浏览)



