File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Problem Validating html:file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem Validating html:file" Watch "Problem Validating html:file" New topic

Problem Validating html:file

Vijay RamaRaju

Joined: Feb 27, 2006
Posts: 7
I have a problem while trying to validate <html:file> control. When the user types in the invalid textual information in the browse button., when i submit the form it is giving the javascript error saying the file control is null or not an object. Any Solution.

Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
Here is some code where I perform some validation in my execute method. I am not sure how to do client side java script validation or if this validation could be performed by the validation framework. I don't see a reason why this could not be done in the form's validate method (and now I am wondering why I am not doing that).

If somebody else has a better way of validating this, please pass it along.

- Brent
I agree. Here's the link:
subject: Problem Validating html:file
It's not a secret anymore!