![]() If we want to change the attribute name in the future, we will have to change all the places where we have session authentication. The approach is simple but if we have a lot of servlets and jsps, then it will become hard to maintain because of redundant code. In the last article, we learned how we can manage session in web application and if we want to make sure that a resource is accessible only when the user session is valid, we can achieve this using servlet session attributes. Servlet Filter Example for Logging and session validation ![]() ![]() We will look into various usage of servlet filter, how can we create a filter and learn its usage with a simple web application. In this article, we will lean about the Servlet Filter in Java. This is the fourth article in the series of Web Applications Tutorial, you might want to check out earlier articles too. It can also intercept the response and do post-processing before sending to the client in web application. Java Servlet Filter is used to intercept the client request and do some pre-processing.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |