struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Ruggles <a.rugg...@gmail.com>
Subject Re: [S2] Access DAOs in Spring actions
Date Wed, 25 Apr 2007 06:44:46 GMT
If you are using the spring plugin then all you should have to do is add 
a setter to your action class and spring will handle it.

ie

public void setUserDAO(IUserDAO userDAO) {
    this.userDAO = userDAO;
}

wolverine my wrote:
> Hi!
>
> I have action classes configured in struts.xml and the DataSource,
> SessionFactory, DAO objects configured in Spring's
> applicationContext.xml.
>
> How can I reference the DAO objects in my action class?
>
> Please advise, thank you!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>


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


Mime
View raw message