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



can it possible to validate form field before execution of a servlet service method if yes how??..

Answer / sekhar babu

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

can it possible to validate form field before execution of a servlet service method if yes how??..

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

can it possible to validate form field before execution of a servlet service method if yes how??..

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

can it possible to validate form field before execution of a servlet service method if yes how??..

Answer / alluri.nagaraju

By using Filters u can also validating the form feilds

Is This Answer Correct ?    4 Yes 1 No

can it possible to validate form field before execution of a servlet service method if yes how??..

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

can it possible to validate form field before execution of a servlet service method if yes how??..

Answer / ravikiran

with javascript

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Servlets Interview Questions

Can we write a constructor for a Servlet class ? if yes how ? if no why not ?

10 Answers  


What is the need of session tracking in HttpServlet ?

3 Answers  


A client sends requests to two different web components. Both of the components access the session. Will they end up using the same session object or different session ?

0 Answers  


What compiler do not do if we create our own constructor?

5 Answers   HCL,


Are Servlets Thread Safe? How to achieve thread safety in servlets?

0 Answers  






What is the directory structure of a war file?

0 Answers  


Why is http protocol called as a stateless protocol?

0 Answers  


How native code can be used in a servlet?

0 Answers   IBM, TCS,


What are its drawbacks of cgi?

0 Answers  


How will you open a new page after certain interval of time (5 sec), on clicking of a button in an html page?

2 Answers  


What is the capacity that doGet method can send to the server?

5 Answers  


What are the methods in HttpSession and their use?

3 Answers  


Categories