2010-05-20 32 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

相關問題