This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts 2 file upload returning null Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 file upload returning null" Watch "Struts 2 file upload returning null" New topic
Author

Struts 2 file upload returning null

aman thind
Ranch Hand

Joined: Jun 29, 2007
Posts: 71
Hi,
I have a jsp file with s:file tag. If i run a javascript function which displays the name of file being uploaded,it works fine. But my action is getting only null.I've file upload interceptor in my struts.xml,as far as i know i've done everything correct.But still it is not working. One more thing,i am trying to receive the values in add() method of my action,and not null.And i have directed my jsp(by a javascript function) to run the add() method. Please help.
Thanks in advance,
Aman


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

Joined: Aug 03, 2008
Posts: 9378
    
  20

Please show us the code of your JSP, action and struts.xml...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
aman thind
Ranch Hand

Joined: Jun 29, 2007
Posts: 71
Ankit Garg wrote:Please show us the code of your JSP, action and struts.xml...

Thanks,it seems the problem was in the jsp in which my jsp was included.
 
jQuery in Action, 3rd edition
 
subject: Struts 2 file upload returning null
 
It's not a secret anymore!