As the author of the "Action Plug-In Extension" I'd be happy to provide some patches for integrating it into the Struts code base. But before spending my evening(s) on it, I'd like to hear the opinion of the committers first.
For the moment the extension uses an extended version of the RequestProcessor (or the TilesRequestProcessor, if you want to use Tiles in combination with the Action Plug-In Extension), but it would be far better to integrate its behavior into the Struts RequestProcessor class. Gerrie Kimpen PS: - I attached a small off-line discussion between Brandon and myself on how to best integrate the extension. - I'm leaving on holiday tonight :) so I won't be able to respond until somewhere next week. ----- Original Message ----- From: "Phase Web and Multimedia" <[EMAIL PROTECTED]> To: "Struts Dev" <[EMAIL PROTECTED]> Sent: Wednesday, August 14, 2002 3:34 PM Subject: What about "Struts Action Plugin Extension"? > Greetings, > > A while back I sparked a lengthy discussion on the topic of a "configurable" > preproccessor that can make calls on model components for common data > preparation (pre-action). Someone told me thet the Workflow extension > accomplished this. I didn't find that to be completely true (I think it was > a misunderstanding of my problem). > > As a result I am consdering using the "Struts Action Plugin Extension" > (http://www.asqdotcom.be/struts/) that is displayed on the Struts resource > page. I was curious what committers' thoughts were on this extension. Has > this extension been considered as becoming part of the Struts code base ? If > not, then is there something comparable in the works? > > There is a need for a configurable prepocessor or action chaining that > allows for "reusing" common contoller and data preparation code without > having to hard code it into your Action class. If this is a viable plug-in > (and it looks pretty darn slick to me) then I will commit to helping to > enhance it and provide patches for integrating it into the Struts code base. > Following is the link to this extension. Can some developers give me some > opinions as to the viability and longevity of this extension? > > I would like to avoid an Action/Servlet chaining debate. imho this extesion > avoids all those hairy issues and is quite different. It is integrated a lot > smoother. I am just interested in hearing about alternative solutions and/or > potential compatibility issues with other popular extensions. > > Brandon Goodin > Phase Web and Multimedia > P (406) 862-2245 > F (406) 862-0354 > [EMAIL PROTECTED] > http://www.phase.ws > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > >
From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Subject: RE: Contributer Date: woensdag 14 augustus 2002 17:09 Hi Brandon, 1) I'm willing to put some work into writing the patches to integrate the Action Plug-in Extension into the Struts code base. But, I'm leaving on holiday this evening. I can start on it by the end of next week. 2) If we would integrate the xml config elements into the base struts configuration then it is indeed a good idea to provide the syntax to define more than one ActionPlugin filter set. In that case a default action filter chain (like you suggest) will come in very handy, since it limits the amount of ruleset-attributes in the <action>-elements. However, for example, disabeling the security check on a certain Action mapping, is now already possible using the <disable-for>-element. Moreover, I would like to add support for url-patterns into the <disable-for>-element. For example: ... <disabled-for> <action-path>/shop/*</action-path> </disabled-for> ... 3) A detail: personally I would choose the name <action-plug-in-list> instead of <action-plug-in-rule-set> for two reasons: a) The action plug-ins will be executed in the *order* that they are specified in the <action-plug-in-(rule-set|list)>-element. A java.util.List keeps its elements in a particular order, not a java.util.Set. (This might seem a stupid reason :)) b) I think an action plug-in is not always a "rule", since it can be used to inspect things, to do some logging, ect. ... BTW: I'm at work at the moment and I'm not able to follow the struts developer board. I'll try to have a look at the mailing list discussion tonight. Tnx for the interest, Regards, gerrie PS: The reason why I haven't set up a sourceforge cvs yet, is simple: I'm quite new to open source development and I did not know about sourceforge. I'll set it up when i'm back from my holiday. -----Original Message----- From: Phase Web and Multimedia [mailto:[EMAIL PROTECTED]] Sent: woensdag 14 augustus 2002 16:11 To: [EMAIL PROTECTED] Subject: RE: Contributer I am poking around on the struts developer board and asking their thoughts on your extension. I would like to integrate it into the struts code base. Have you discussed this with them before. It would not be difficult at all to do this. There are few issues... such as integrating the xml config elements into the base struts configuration. Also, my thoughts were to expand the configuration so that you can create ActionPlugin filter sets. For example, you would define your Action Plugins and a default action filter chain. Then you could also set up other sets of filter chains with a different combos of actions. Say you do not want to run the security check on a certain Action mapping, the solution then would be to set up a Action Plugin filter set that didn't have the security check in it. In summary here are my thoughts: 1) Provide patches for integration with code base. You don't have to be a committer to do this and it speed that acceptance into the base by giving committers something to work with. 2) Extend the functionality by adding Filter Rule Sets that can use the base Action declarations to create Sets of Action Plugins to be applied to different ActionMappings. For example: <!-- Plug in declaration --> <action-plug-in name="authenticate"> <class>com.yourapp.web.struts.AuthenticationActionPlugIn</class> <init-params> <param> <name>accountSessionKey</name> <value>userAccount</value> </param> </init-params> <disabled-for> <action-path>/logon</action-path> </disabled-for> </action-plug-in> <action-plug-in name="workflow"> <class>com.yourapp.web.struts.WorkflowActionPlugIn</class> </action-plug-in> <!-- Plug-In rule set declaration --> <action-plug-in-rule-set name="seta"> <plug-in-rule name="authenticate" /> <plug-in-rule name="workflow" /> </action-plug-in-rule-set> <action-plug-in-rule-set name="setb"> <plug-in-rule name="workflow" /> </action-plug-in-rule-set> <!-- include action declaration attribute to use plugin rule set --> <action path="/shop" ruleset="authenticate" validate="false" scope="request" name="shopAction" type="com.foo.ShopAction"> <forward name="auth" redirect="false" path="/shop.jsp"/> </action> P.S. Why not set up a sourceforge cvs? Thanks, Brandon Goodin Phase Web and Multimedia P (406) 862-2245 F (406) 862-0354 [EMAIL PROTECTED] http://www.phase.ws <http://www.phase.ws/> -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 14, 2002 5:24 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: Contributer Hi Brandon, you are right that several other projects (f.e. Tiles) extend the RequestProcessor class. Therefore it is ideal that our Action Plug-In Extension is integrated in the base Struts code. However, this should be done by a Struts committer like Craig R. McClanahan or James Holmes since it is our strategy to not touch the Struts base code ourselves. So, for now, we extend the RequestProcessor class. I should send a message to the developers list with a request to do so. I too had the idea that, once our Action Plug-In mechanism is in the Struts base code, projects like Tiles migth be used without the need of extending a RequestProcessor. But Tiles is a special case, because it enables you to forward to Tile definitions. But anyway, it is a good idea to add the Action Plug-In Extension to the base code. I don't have a cvs set up. The sources are simply available for download. HTH, Gerrie Kimpen -----Original Message----- From: Framework Sent: dinsdag 13 augustus 2002 19:39 To: VERNIJST; VERPLANI; DREESDA; KIMPENGE; MERTENBE; DUCHEYTI; CLAESGER; FOLLONKO Subject: FW: Contributer > ---------- > From: Brandon Goodin[SMTP:[EMAIL PROTECTED]] > Sent: Tuesday, August 13, 2002 7:45:39 PM > To: [EMAIL PROTECTED] > Subject: Contributer > Auto forwarded by a Rule > Greetings, What you are doing is exactly what I have been needing. I had a few questions. Have you integrated this into the Struts source code, without exteding the RequestProcessor, or seen what it would require to incorporate this into the struts base code. The issue that I see is that the RequestProcessor is being extended by several other projects. I am not completely sure but with the plug-in extension could all the other RequestProcessors being extended by projects like tiles interface with struts through your plugin? I have not extended the Request Processor before so I am not sure if this is a mute point (i.e. several RequestProcessors can coexist just fine). Also, do you have a cvs repository set up for this project? Thanks, Brandon Goodin Phase Web and Multimedia P(406)862-2245 F(406)862-0354 http://www.phase.ws <http://www.phase.ws>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>