hi all am using the servlet filter for the first time. I have got some doubt in its usage. What is the use of chain.doFilter(request, response); inside the doFilter method. If am commenting out that line my servlet is not working and it also does not throw any exception in the console. When will the filter init() and filter destroy() method calls. My sample program does not calls the above methods.
hi, filters are like layers sitting between client and the actual servlet. it is used for performing some actions on the request from client and response to the client. you can use it for logging xml transformations stuff like that. number of layers i said earlier is equivalent to number of filters. it can either act on request or response or both. normally n number of filters can be mapped to one or more servlets.and this is configured in config file rgds muthu
Arch enemy? I mean, I don't like you, but I don't think you qualify as "arch enemy". Here, try this tiny ad: