Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts2 FileUpload - request is nulled

 
Kate Oakes
Greenhorn
Posts: 2
Firefox Browser Tomcat Server Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I have a problem with file upload in Struts2. Everything works fine until I add <interceptor-ref name="fileUpload"/> (even without any parameters) to the action configuration - it results in request being null. If I don't add this line, I get the uploaded file and there aren't any problems with the request. But since I have to restrict what can be uploaded I have to add the interceptor-ref. I use Struts 2.0.11 and Spring 2.5.5. My application also uses Struts 1.2.9 (might this be a problem?).

struts.xml:


Action:


CaseAction: (this is my base action)


I would be thankful for any help, or any explanation why this happens, if this is the correct behaviour.
[ July 22, 2008: Message edited by: Kate Oakes ]
 
Kate Oakes
Greenhorn
Posts: 2
Firefox Browser Tomcat Server Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The interceptor reference overrides the default interceptor stack. Adding in the action configuration in struts.xml solved it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic