2008/12/8 Dave Newton <[EMAIL PROTECTED]> > --- On Mon, 12/8/08, Raquel Pau Fernández wrote: > > Excuse me for insisting, but the problem of using <s:action> is that > > you need to offer always it as url... > > Using Codebehind you don't need to configure it via XML; I don't see any > practical difference between using URLs or classnames to access an action.
An URL can be accessible from the browser but not a class. Codebehind offers automatically an URL...but I don't want it. All is for security reasons... Is the same reason that you don't have to permit access directly to your JSPs.. For instance, you only want to show this data under some conditions (submit an specific form). In order to satisfy it, the people puts the service call code in the previous action but it produces a dependency between what do you want to show and what do you need perform under a submit. > > > [...] but also perhaps is necessary pass some request or session > > parameters to this service and they have not been necessary for the > > executed action. > > Another reason I think it's a bad idea and more trouble than it's worth. I only need to execute the logic of Params interceptor...or getting all the parameters and using BeanUtils to put their value to the action. > > IIRC the action tag uses the current value stack (which includes the > request and session maps) for the action being executed, so (if that's > correct) the only thing you're asking for is the ability to instantiate the > action based on its classname rather than a URL? Yes because my action may not be an URL. > > > > Therefore, using Spring or any other IoC framework having > > Struts2 is unnecessary and you lost a lot of performance [...] > > S2 uses (a version of) Guice to do its IoC/DI by default. I also think > you're over-estimating the performance penalties of Spring (for example). Anyway, you need to call two java reflections.. > Dave > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Raquel Pau