aspose file tools*
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 Spring in Action this week in the Spring 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
Author

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.
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>


Aman Thind
SCJP,SCWCD
JAVA utte mar JAVA,mit JAVA
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9305
    
  17

Checkout this


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

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: http://aspose.com/file-tools
 
subject: Struts 2 file upload tag type allowed error