我在哪里可以找到defaultStackHibernate拦截器堆栈的内容?

时间:2010-05-20 15:01:39

标签: hibernate struts2

我正在使用struts 2和full-hibernate-plugin-for-struts2。我想设置fileUpload拦截器

<param name="allowedTypes">image/png,image/gif,image/jpeg</param>

我在哪里可以找到defaultStackHibernate的内容,所以我可以这样做?

1 个答案:

答案 0 :(得分: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