This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts 2 file upload tag type allowed error Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply 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
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9189
    
    2

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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Struts 2 file upload tag type allowed error
 
Similar Threads
Interceptor issue in Struts 2
Replacing an Interceptor in the Default Stack
bypassing interceptors
It is possible to exclude interceptor for given action?
Struts 2 Fileupload problem