aspose file tools*
The moose likes Struts and the fly likes question about struts validator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "question about struts validator" Watch "question about struts validator" New topic
Author

question about struts validator

Nilesh Thali
Greenhorn

Joined: Jan 13, 2009
Posts: 16
I'm still on an ancient version of struts (1.2.4), but in any case: i understand the struts validator framework being invoked when a user submits a form. my question is: if a user simply types the parameters in the URL and hits enter, would that also invoke the validator?
e.g. user just typed http://validator.testing.com/someAction.do?param1=x&param2=y and hit enter, would the input be validated?
in my case it doesn't seem to.
is there any way (in terms of logs etc.) to find out if the validator was called?
Thanks,
Nilesh
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Applications using the Apache Struts framework can also be configured to use the Apache Commons Validator framework to validate HTML Form fields.

The request parameters in your URL example above are not HTML Form fields and are not validated.

In regards to data in log files, you can check to see if there is information from the form validation in a few ways. One easy way would be to create a form and configure the application to validate the form fields. Then check the log file. If you don't see anything, then set web server's log level to 'DEBUG' and then check. If you still don't see anything and you know the validation functioned correctly, then you can assume that there is no way to find out if the validation occured in terms of log files.
 
Consider Paul's rocket mass heater.
 
subject: question about struts validator