struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Neè <mario....@xmoon.org>
Subject Re: Architectural question
Date Wed, 29 Jun 2005 13:04:57 GMT
following your example:

<action path="/PostWebServiceAction" type="org.xmoon.GenericStrutsAction">
       <forward name="default" path="..."/>
</action>


PostWebServiceAction.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<service>
    <task>
         <code language="beanshell">
             // business logic
            workbench.setForward("default");
         </code>
     </task>
</service>



BHansard@powersystems.rockwell.com wrote:

> So long as the Action class is performing a truly generic function 
> then I see no problem with this. Additionally, the name of the Action 
> should reflect the function that is being performed. For example, if 
> the action is forwarding a bean embedded in the form to a web service, 
> the Action should be named something like PostWebServiceAction. 
> However, if the action has logic built into it to determine which jsp 
> is feeding the action and how to Interpret the data, this should be 
> broken out.
>

> Hello,
> Does anybody knows if there is some problem in using single Action class
> to serve more Service ?
> XMoon load service automatically from xml but the Action class is the 
> same.
>
> ex:
>
> <action path="/console" type="org.xmoon.GenericStrutsAction">
>        <forward name="default" path="/pages/console.jsp"/>
> </action>
>
> <action path="/test" type="org.xmoon.GenericStrutsAction">
>        <forward name="default" path="/pages/test.jsp"/>
> </action>
>
> -- 
> Mario Nee'
> Brescia Italy
> mario.nee@xmoon.org
> http://www.xmoon.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Mario Nee'
Brescia Italy
mario.nee@xmoon.org
http://www.xmoon.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message