Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question about struts validator

 
Nilesh Thali
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic