例如<input type="file" name="file111"/>
那么在ACTION类里用什么类接收file111?
apache的用哪个?spring又用哪个?

解决方案 »

  1.   

    你既然用了Struts2,在Action中定义一个File变量,名字和你input的名字一样,配置好之后,直接就可以上传了。好像会用到一个copy方法
      

  2.   

    struts2 要用到form提交<form id="add" action="brand/add.do" method="POST"  enctype="multipart/form-data">
    file标签 <input class="easyui-validatebox" type="file" name="logo"></input>
    jsp页面类似这样。
    在你的action里面定义一个File logo;给set、get方法就可以获取了 
      

  3.   

    http://www.baidu.com/  http://www.google.com/