This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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: 9291
    
  17

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2 file upload returning null
 
Similar Threads
executing a javascript function from a servlet
why can't use request.getParameter when jsp form's enctype is "multipart/form-data"
Calling a jsp page from javascript
Help needed with IE 6.0 submit
Struts 1