Create a Filter in Java
An Example in Netbeans 8.0.2.
Right click the mouse on Source Packages and select New -> Filter... from the menu.
Select a class name,
, and a package name,
, for the Filter. After this press the Next Button.
Select Add information to deployment descriptor (web.xml).
Select the Filter and move it to your desired position in the chain.
Press the Edit... button to change the URL for the new filter.
Select the appropriate Servlet,
, and press the OK button.
You will return to the previous window so press the Finish button.
You are now ready to change the Filter class to your needs.
© 2010 by Finnesand Data. All rights reserved.
This site aims to provide FREE programming training and technics.
Finnesand Data as site owner gives no warranty for the correctness in the pages or source codes.
The risk of using this web-site pages or any program codes from this website is entirely at the individual user.