• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to extend Request Processor class in STRUTS?

 
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic