FilterConfigAn object of FilterConfig is created by the web container. This object can be used to get the configuration information from the web.xml file. Methods of FilterConfig interfaceThere are following 4 methods in the FilterConfig interface.
Example of FilterConfigIn this example, if you change the param-value to no, request will be forwarded to the servlet otherwise filter will create the response with the message: this page is underprocessing. Let's see the simple example of FilterConfig. Here, we have created 4 files:
MyFilter.java HelloServlet.java web.xml download this example (developed using Myeclipse IDE) download this example (developed using Eclipse IDE) download this example (developed using Netbeans IDE) Next TopicUseful Example Of Filter |