2010-05-20 40 views

回答

0

从文件struts-plugin.xml。它应该在插件的jar包的根目录下。

编辑:当然,你不需要修改struts-plugin.xml本身。您可以在struts.xml像这样覆盖拦截器的定义:

<action name="myAction" class="myActionClass"> 
    <interceptor-ref name="defaultStackHibernate"> 
    <param name="fileUpload.allowedTypes">image/png,image/gif,image/jpeg</param> 
    </interceptor-ref> 
</action> 

更多的建议,请http://struts.apache.org/2.x/docs/interceptors.html

相关问题