struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Re: Spring Struts problem
Date Thu, 24 Mar 2016 14:11:57 GMT
2016-03-24 14:56 GMT+01:00 José Antonio Delgado Trujillo <jadtmat@gmail.com>
:

> I understood that spring can manage and inject dependency class in Action.
>

You can also use CDI instead of Spring


> In the example manage and inject EditServiceInMemory.
> To do this:
>
>    - Insert the struts spring plugin dependency in the POM.
>    - Insert the spring listener in the web.xml
>    - Write the configuration file with the bean editService.
>    - Create getter and setter to editService.
>
>
> I did it and it run.
>
> But there is an alternative: let Spring to manage also the action class
> (EditAction).
> To do this:
>
>    - Insert another bean editAction with the property editService in the
>    configuration file.
>    - Change the class in node action of struts.
>
>
> I did it and it doesn’t run.
> I don’t know why…
> The framework can’t instantiate the action class due to it doesn’t know
> who is the bean editAction.
>

Can you share your config?


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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