• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

File Uploading With DynaValidatorForms

 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just used

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

Zak
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic