• Controler,  Learn Struts,  RequestProcessor,  Struts Components

    What is RequestProcessor, how to extend it?

    RequestProcessor is a class which is used by ActionServlet to maintain the state and process the activities in different level of request lifecycle. RequestProcessor have following method into it:1.) processPreprocess – Used to execute line of code before the action servlet start working on any request.2.) processPostprocess – Used to run snippet after the process method finish its work. Below is the flow of work for struts with requestprocessor: Can we create our own RequestProcessor?Yes, We can create your own RequestProcessor class and can override any of above methods to fulfill the Business requirement. Add below snippet into Struts-Config.xml <controllercontentType=”text/html;charset=UTF-8″debug=”0″nocache=”true”processorClass=”com.testComp.MyOwnRequestProcess”/> Create a class with below declaration: public class MyOwnRequestProcess extends RequestProcessor…

    Comments Off on What is RequestProcessor, how to extend it?
  • Controler,  Learn Struts,  RequestProcessor,  Struts Components

    What is RequestProcessor, how to extend it?

    RequestProcessor is a class which is used by ActionServlet to maintain the state and process the activities in different level of request lifecycle. RequestProcessor have following method into it:1.) processPreprocess – Used to execute line of code before the action servlet start working on any request.2.) processPostprocess – Used to run snippet after the process method finish its work. Below is the flow of work for struts with requestprocessor: Can we create our own RequestProcessor?Yes, We can create your own RequestProcessor class and can override any of above methods to fulfill the Business requirement. Add below snippet into Struts-Config.xml <controllercontentType=”text/html;charset=UTF-8″debug=”0″nocache=”true”processorClass=”com.testComp.MyOwnRequestProcess”/> Create a class with below declaration: public class MyOwnRequestProcess extends RequestProcessor…

    Comments Off on What is RequestProcessor, how to extend it?