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 File Uploading With DynaValidatorForms 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 "File Uploading With DynaValidatorForms" Watch "File Uploading With DynaValidatorForms" New topic
Author

File Uploading With DynaValidatorForms

Zak Nixon
Ranch Hand

Joined: Sep 27, 2003
Posts: 126
Hi.

My problem is the following. I am trying to do a file upload to the server.
I have successfully made my forms upload the file to the appropriate
form bean and it is performing the execute() method. Now, the problem:

I have seen that many people do the following code:

Reference:
Struts Example

But if you have defined no class, but let the DynaValidatorForm do it for you, how can you ever cast the class to retrieve your FormFile object?

Any suggestions would be helpful.

Zak
Zak Nixon
Ranch Hand

Joined: Sep 27, 2003
Posts: 126
I just used

(String)((DynaValidatorForm)form).get("valueIneed");

Zak
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: File Uploading With DynaValidatorForms
 
Similar Threads
NT performance Error when uploading file.
HTTP Status 405 - HTTP method GET is not supported by this URL
NT Performance error when uploading file
Multipart/form-data enctype incompatible with file upload?
Redirect back to portlet from servlet keeping same parameters