aspose file tools*
The moose likes Struts and the fly likes Validate uploaded Files with the Validator-Framework Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Validate uploaded Files with the Validator-Framework " Watch "Validate uploaded Files with the Validator-Framework " New topic
Author

Validate uploaded Files with the Validator-Framework

Florian Kammermann
Greenhorn

Joined: Jan 22, 2005
Posts: 8
I have the following trouble:

I use only DynaValidatorForms for passing the Formdatas.
The validation of the input I make with pluggable validator-classes, which I configure in the validator-rules.xml.
For String-validation this is no problem, but how I can get a FormFile-Object from the DynaValidatorForm?

Such a pluggable class have the following look:

public static boolean validateActualPassword(
Object bean,
ValidatorAction va,
Field field,
ActionErrors errors,
HttpServletRequest request) {

//Get the propertys
String actualPWD = ValidatorUtil.getValueAsString( bean, field.getProperty());
String sProperty2 = field.getVarValue("secondProperty");
String username = ValidatorUtil.getValueAsString( bean, sProperty2);


I found nothing on the web, how I can get a property as a Fromfile and not as a String.

Thanks for reply.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Validate uploaded Files with the Validator-Framework