posts - 24,  comments - 25,  trackbacks - 0
<?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>

<package name="upload" extends="struts-default">
<action name="upload" class="poi.UploadAction">
<interceptor-ref name="fileUpload">
<param name="allowedTypes">
application/vnd.ms-excel,application/actet-stream
</param><!-- 如果上次的文件类型不对,则会在action之前拦截,并清空页面上传文件 -->
</interceptor-ref>
<interceptor-ref name="defaultStack"/>
<param name="savePath">/upload</param>
<result name="input">/upload.jsp</result>
<result>/succ.jsp</result>
</action>
</package>

</struts>

bmp:image/bmp

png:image/n-png

jpg:image/jpg

word:application/msword

  excel:application/vnd.ms-excel

 

有些地方有可能是:

  bmp:image/bmp

png:image/n-png

jpg:image/pjpeg

word:application/actet-stream

excel:application/actet-stream



posted on 2009-02-12 10:31 Jarry 阅读(1181) 评论(0)  编辑  收藏 所属分类: Struts2.x

只有注册用户登录后才能发表评论。


网站导航: