can it possible to validate form field before execution of a
servlet service method if yes how??
Answers were Sorted based on User's Feedback
Yes,
If it client side validation do with the javascript
if it is serverside validation we can use Filters and do
the validations there example login authenticated or not
| Is This Answer Correct ? | 8 Yes | 1 No |
Answer / suresh
We can do it, There are two validation is available
1. Form validation
2. Server side validation
1. Form Validation - This validation is perform client side,
java script used to achieve these form validation
2. Server side Validation - This type we can use predefined
server side validation method used to achieve these validate.
Note:- In perform wise we compare Form validation is better
than server side validation. it's easy to progress.
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / geetha
yes, it is possible. write a javascript method to validate
input fields and call this method based on event of your
requirement.
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / alluri.nagaraju
By using Filters u can also validating the form feilds
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / m saravanakumar
If you want to intercept a request before servicing you
should use Filter concept in servlet which will help in
lots of ways. like the following...
1) Using the Filter we can logs the IPAddress of client
machine in log file.
2) can do the form validation like trim() functions.
| Is This Answer Correct ? | 3 Yes | 0 No |
How to pass session values from one servlet container to another servlet container? or how can we get session values of one container in another container?
What is a servlet context object?
What is the use of httpservletrequestwrapper and httpservletresponsewrapper?
How do you track a user session in servlets?
Is Servlet Class Thread safe?????? How to make servlet Thread safe ???
What are session variable in servlets?
What is a java servlet?
Name the webserver that is used to run Servlets?
How do you communicate in between Applets and Servlets?
Why filter is used in servlet?
Why is it that we can't give relative URL's when using ServletContext.getRequestDispatcher() when we can use the same while calling ServletRequest.getRequestDispatcher()?
Can a servlet be called by passing its name as a parameter in the URL?