File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts 2 file upload tag type allowed error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 file upload tag type allowed error" Watch "Struts 2 file upload tag type allowed error" New topic

Struts 2 file upload tag type allowed error

aman thind
Ranch Hand

Joined: Jun 29, 2007
Posts: 71
Whenever i try to upload a file in my application in which i have used struts file tag, I am getting following message:
Unable to find 'struts.multipart.saveDir' property setting. Defaulting to javax.

Any idea how to resolve this.
Below is my code:
<interceptor-stack name="fileUploadStack">
<interceptor-ref name="exception" />
<interceptor-ref name="alias" />
<interceptor-ref name="servletConfig" />
<interceptor-ref name="prepare" />
<interceptor-ref name="i18n" />
<interceptor-ref name="chain" />
<interceptor-ref name="debugging" />
<interceptor-ref name="profiling" />
<interceptor-ref name="scopedModelDriven" />
<interceptor-ref name="modelDriven" />
<interceptor-ref name="fileUpload">
<param name="allowedTypes"> application/xls</param>
<param name="maximumSize">10240</param>
<interceptor-ref name="checkbox" />
<interceptor-ref name="staticParams" />
<interceptor-ref name="actionMappingParams" />
<interceptor-ref name="params">
<param name="excludeParams"> dojo\..*,^struts\..*</param>
<interceptor-ref name="conversionError" />
<interceptor-ref name="validation">
<param name="excludeMethods"> input,back,cancel,browse</param>
<interceptor-ref name="workflow">
<param name="excludeMethods"> input,back,cancel,browse</param>
<interceptor-stack name="secureStack">
<interceptor-ref name="authentication" />
<interceptor-ref name="defaultStack"/>
<action name="someaction" class="someactionclass">
<interceptor-ref name="fileUploadStack" />
<result name="input">/somejsp.jsp</result>
<result name="success">/somesuccess.jsp</result>
<result name="error">/error.jsp</result>

Aman Thind
JAVA utte mar JAVA,mit JAVA
Ankit Garg

Joined: Aug 03, 2008
Posts: 9466

Checkout this

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
David Newton

Joined: Sep 29, 2008
Posts: 12617

Please UseCodeTags when posting code or configuration. Unformatted code and configuration is very difficult to read. You can edit your post to include them by using the button.

And what's to resolve? It's just telling you where it's saving the temporary files.
I agree. Here's the link:
subject: Struts 2 file upload tag type allowed error
It's not a secret anymore!