struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrice Le Cozler" <plecoz...@gmail.com>
Subject Re: call a struts action from an axis service
Date Thu, 28 Sep 2006 16:07:14 GMT
My business logic is not in actions but is not struts-independant since it
uses datasources initialized during struts servlet loading. Is there a way
to get theses datasources and more generally get struts config from another
servlet inside the same webapp ?

On 9/28/06, Antonio Petrelli <apetrelli@apache.org> wrote:
>
> Patrice Le Cozler ha scritto:
> > Hi,
> >
> > Here is my (axis newbie) problem: I developed a struts webapp that
> insert
> > data to a database using ibatis.
> > Now I want to add some kind of webservice connector that does the same
> > job.
> > I think the best way to do that would be to find a way of calling the
> > struts
> > action from within the axis service class but I don't know how to do
> that
> > since my service class don't know about ActionMapping, ActionForm,
> > HttpServletRequest and HttpServletResponse parameters.
> > Did anybody faced a similar problem (and found a solution) ?
>
> Sure, simply don't call an action :-) you have to call the same Model
> (in the MVC model) part that the Struts action calls.
> If you put all your business logic inside your action then probably you
> should refactor it to be Struts-agnostic.
>
> Ciao
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message