I need to implement a particular logic in my web application (its a struts application) where I want to populate an arraylist before the user performs the login operation. This is needed as I want to compare certain user attributes after the user had logged in.
Can this be done using a separate servlet having the load-on-startup value specified? Will the particular servlet be available only when i restart the servlet or it will be available if I redeploy the application?
Can someone please suggest an appropriate solution for the same as I am new to both servlets and struts.
Joined: May 14, 2004
You can use a Servlet Filter to do this.
You need to
1) Implement the business logic that you mentioned in the Servlet Filter class
2) Configure this filter to be invoked whenever your login servlet gets called