[EMAIL PROTECTED] wrote:
FYI, all of my Actions call a common setup function at the start of execute(), and one of the things it does is set an attribute "command" in the request with the value of getPath() called on the ActionMapping.
FYI, that's exactly what I am doing rigth now!
As I use Jakarta Velocity I cannot use static fields such as org.apache.struts.Globals.MAPPING_KEY (the constant for "org.apache.struts.action.mapping.instance"). So I am implementing this solution.
The only think I don't like with this solution is that the JSP writer has to know the existence of the "command" attribute into request. Moreover if the Action writer forgot to call the "setup" method the request attribute will not set.
If you use jakarta velocity, another easy and probably less restricted solution could be to extend the StrutsLinkTool and register it into toolbox.xml instead of the standar link tool:
<tool> <key>link</key> <scope>request</scope> <class>yourpackage.MyStrutsLinkTool</class> </tool>
regards, gianpiero
MyStrutLinkTool.java
Description: java/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]