• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

customizing RequestProcessor.

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello to the members of JavaRanch. I am new to this forum and in case anyone finds me not adhering to the rules please inform me.
Although I am trying hard to not break any rules
I had a query can we override the RequestProcessor in such a way that instead of invoking the execute() method of the action class it invokes any other method of the class
say for example MyMethod().

Please help me out on this. Thanks in advance for your support and suggestions.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sure, but why would you want to?
 
Rohit Sharad Sharma
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for replying David.
David my team is working on a new design and we all were stuck at this point. Nothing is been finalized yet, but just to overcome my curiosity I posted the issue on the forum. Because I was sure that i'll get the answer only here.
Thanks for your support, if you could please help me out in this.
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rohit Sharad Sharma wrote:Hello to the members of JavaRanch. I am new to this forum and in case anyone finds me not adhering to the rules please inform me.
Although I am trying hard to not break any rules
I had a query can we override the RequestProcessor in such a way that instead of invoking the execute() method of the action class it invokes any other method of the class
say for example MyMethod().

Please help me out on this. Thanks in advance for your support and suggestions.



Didn't realize much about your requirement, but I thought you're asking somethings like this:

In your action form:
action="myAction_myMethod"
...
struts.xml
<action name="myAction_*" class="MyActionClass" method="{1}">
...
MyActionClass.java
...
public void myMethod(){
...
}

 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wrong version of Struts, if the OP is asking about customizing a request processor.

Don't know about 1.3, but in 1.2 it seems like this is something you should be able to figure out on your own, no? Have you looked at the Javadocs for RequestProcessor? Hopefully once you have it'll be obvious where to look in the source code (which you'll want to do if you're trying to duplicate its functionality, even if you're adding behavior).
 
I child proofed my house but they still get in. Distract them with this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic