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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the major difference between context parameter and context attribute?

591


What is the difference between 2 types of servlets?

640


Which is better jsp or servlet?

550


What is servlet in tomcat?

553


Which method of the httpservletrequest object is used?

557






How do we call one servlet from another servlet?

586


How can the session in servlet can be destroyed?

705


Difference between forward() method and sendredirect() method ?

580


Define the life cycle of a servlets.

567


how many jsp scripting elements are there and what are those?

538


What is the difference between portlet and servlet?

507


Explain how does JSP handle run-time exceptions?

578


How we can call a jsp from the servlet?

529


How can you use a servlet to generate a plain text instead of html?

582


Difference between java beans & servlets?

583