Dave, Excuse me for insisting, but the problem of using <s:action> is that you need to offer always it as url... In other words, 'yes' i need to call a service from the JSP without an action mapping that serves it and skip the intermediate layer, but also perhaps is necessary pass some request or session parameters to this service and they have not been necessary for the executed action. Any solution?
I would want to insist that with Struts2 (as main difference with Struts1) you do not need an intermediate layer.. It has become unnecessary because you have lost the coupling with the kind of communication interface (in this case HTTP) and you could use your actions for instance, in a swing application. Therefore, using Spring or any other IoC framework having Struts2 is unnecessary and you lost a lot of performance because you need to use reflection twice (one for the action and another one for the service). In fact, when I used Struts1, I used the commons-chain library to make the same task as Struts 2 to call the command passing a map with all request and session parameters. Therefore, in general, only one action class was necessary in all the configuration, because this default action returns the result (put by the command) than gives the forward.. Thank you very much 2008/12/8 Dave Newton <[EMAIL PROTECTED]> > --- On Mon, 12/8/08, Raquel Pau Fernández wrote: > > I want to call services, but if I put the service in the > > action, at code level, the action must know(implicitly) > > what is the following content page. > > IMO the action should always be responsible for what's available in the > view, but that may just be me. > > I'm still not sure I like the idea of calling *action* code to get the data > that you want, though--I think it would be much cleaner to provide a > mechanism for accessing service instances in the JSP and skip the > intermediate layer. > > > I need to call an action code from a JSP page without > > becoming it an URL. I've not found that the framework > > could provide it because always calls an action that > > must be an URL. > > Again, while I don't think this is a good idea, it'd be easy enough to use > Codebehind and the <s:action...> tag to do this, although there are a few > potential "gotchas" with the action tag. > > > PD: Excuse me for my poor English. > > It's better than mine ;) > > Dave > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Raquel Pau