I am new to CQ5 and is analysing the working of iddferent components .While analysing form component I could find dat that while loading the form the call goes to the dofilter method of formhandlingservlet. Can anybody help me on how the call goes. From where it is goin to the doFilter method. ?
I guess this is how it works,
FormsHandlingServlet is registered as a Filter also as a servlet( registered for resource type foundation/components/form/start and intercept all request with selector "form" and extension "html"). Any Post to form invoke filter hence dofilter which adds "form" and "html" as selector and extension which again calls same class with doPost method and process start form request.
More in detail...
A servlet can be defined as filter service by defining couple of properties "sling.filter.scop and service.ranking" which tells sling framwork when (event and rank) to run this service as there are various filters at different level already defined. FormsHandlingServlet (com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet) has been defined as filter service as well so when your form makes request with selector .from this filter sense it from process the request before it goes to actual scriptlet/servlet.
For more information you can refer some of the Apis which will give you more information.
Hope this will help you in getting insite information.