Struts is a very powerful framework and also very extensible. You can extend Struts in three ways.
1. PlugIn: Create your own PlugIn class if you want to execute some business logic at application startup or shutdown.
2. RequestProcessor: Create your own RequestProcessor if you want to execute some business logic at a particular point during the request-processing phase. For example, you might extend RequestProcessor to check that the user is logged in and he has one of the roles to execute a particular action before executing every request.
3. ActionServlet: You can extend the ActionServlet class if you want to execute your business logic at either application startup or shutdown, or during request processing. But you should use it only in cases where neither PlugIn nor RequestProcessor is able to fulfill your requirement.
No comments:
Post a Comment