Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

When We choose to customize ActionServlet or RequestProcessor?

Status
Not open for further replies.

jollyplay

Programmer
Dec 16, 2003
90
0
0
Hello

Please give me a direction, when we do choose customize ActionServlet (by extends ActionSevlet) or when we do choose customize RequestProcessor (by extends RequestProcessor)

Is it true, for customize, for struts 1.0 we need extends ActionSevlet, for struts 1.1 RequestProcessor?

Please provide any link regarding this if any?

Thank you in Advance,

balachandar
 
Hi

ActionServlet is used when you have to load or verify some thing when the application is loaded on to the server.
RequestProcessor is used when you want to verify some thing in the request before you execute the action or after the action is executed.

Let take an example. I want to load some resources files when the application is loaded (log4j properties) then you will extend ActionServlet and
over load the function initOther();

another examples: When ever user login into the application I want to store all the application pages which user has navigated in a History Object and
store that in DB. Then you will extend RequestProcessor and stores all the URL into the History Object before saving in the DB implement
processPreprocess().

Hope this will answer your questions when to use what.

Cheers
Venu
 
hello

Thank you very much venu, i understand the points you made.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top