This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Struts and the fly likes How to extend Request Processor class in STRUTS? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to extend Request Processor class in STRUTS?" Watch "How to extend Request Processor class in STRUTS?" New topic
Author

How to extend Request Processor class in STRUTS?

Pras Tiwari
Ranch Hand

Joined: Nov 07, 2005
Posts: 186
Hi,
I want to extend Requestprocessor class of my struts application for implementing user authentication into it. How to do this?
Please tell me step by step, as I am new to this.
Thank you.
pras


********Deserve Before You Desire********
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
First of all, if you want to implement user authentication, I would advise you to read this article first. You may find that you don't need to extend RequestProcessor in order to do what you want to do.

If you do decide to extend it, here's the process

1-Download the Source code for the version you are using.

2-Study the methods in RequestProcessor, get a feel for what they do, and identify the method that handles the behavior you want to modify.

3-Write your class extending RequestProcessor and override the method. If you want to add logic to the method rather than replace the method, make sure you call super.theMethod() in your overriden method.

4- Register the class as the request processor for the mudule by inserting the following tag in your struts-config.xml file:

<controller processorClass="com.mycompany.MyRequestProcessor">
[ August 04, 2006: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to extend Request Processor class in STRUTS?
 
Similar Threads
own controller class(ActionServlet)
your suggestions to make my "design" correct
View and post in one action class in Struts
How to write our own validator class using struts 1.x
Struts Validation