• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 file upload tag type allowed error

 
aman thind
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
servlet.context.tempdir

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>
<interceptor-ref name="checkbox" />
<interceptor-ref name="staticParams" />
<interceptor-ref name="actionMappingParams" />
<interceptor-ref name="params">
<param name="excludeParams"> dojo\..*,^struts\..*</param>
</interceptor-ref>
<interceptor-ref name="conversionError" />
<interceptor-ref name="validation">
<param name="excludeMethods"> input,back,cancel,browse</param>
</interceptor-ref>
<interceptor-ref name="workflow">
<param name="excludeMethods"> input,back,cancel,browse</param>
</interceptor-ref>
</interceptor-stack>
.
<interceptor-stack name="secureStack">
<interceptor-ref name="authentication" />
<interceptor-ref name="defaultStack"/>
</interceptor-stack>
.
.
..
<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>
</action>

 
Ankit Garg
Sheriff
Posts: 9528
32
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Checkout this
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic