This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes unable to get Form Object when uploading file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "unable to get Form Object when uploading file" Watch "unable to get Form Object when uploading file" New topic
Author

unable to get Form Object when uploading file

ajith kumar
Greenhorn

Joined: Apr 22, 2005
Posts: 1
Iam trying to upload an excel sheet to the server and read the values and store them in the database . Iam using the struts tag

<html:thefile>
Iam able to upload the excel sheet with less number of rows (around 10) but once number of rows increases the
set method in the file is not getting called .

In the action when iam trying to create an object for the form in the Action iam geting a null for the file object .
UploadForm theForm = (UploadForm) form;
FormFile file = theForm.getTheFile();


the set method is as follows
public void setTheFile(FormFile theFile)
{

this.theFile = theFile;
}

Why the set method is not getting called??

Could any body please comment on this issue???
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: unable to get Form Object when uploading file
 
Similar Threads
Upload multiple files with separate submit buttons
Map the action form object
could not setThe value in html:file
Exception: related to struts ----need help
Exception: related to struts -need help