File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems with struts validator

 
Janice Guevara
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm doing maintenance for an application.I'm trying to implement the struts validator but it doesn't work. The system has been developed to validate the forms in the actions. The problem is that when I run it with my new chages the system still calls the previous code implemented in the actions.What is happening is that the errors are captured as exceptions in a hierarchy and I don't know what to do to validate the forms with the struts validator,it is simply ignored by the system.
Do you have any suggestion?
 
anand kumarblr
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi janice,
if you are using eclipse then in menu bar it will be project then clean the project and the try running it,bcoz sometimes validations will not work till that.try but i know that much only.
bye
Amith
 
Brent Sterling
Ranch Hand
Posts: 948
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My guess is that your forms do not extend ValidatorForm. If your forms just extend ActionForm then the validation framework methods will not be called.

- Brent
 
Purushoth Thambu
Ranch Hand
Posts: 425
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It helps if you can share what change you have made. To call the validate() method you have to set the validate attribute to true in struts-config.xml for the particular action.
[ November 03, 2006: Message edited by: Purushothaman Thambu ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic