struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Burgess <RBurg...@nuvox.com>
Subject Re: HOw to send form parameters to dao in struts2 with hibernate?
Date Thu, 28 Feb 2008 14:55:03 GMT
If you have your service and DAO defined in a Spring application context you
would normally have the DAO as a property of your service or you would have
a constructor-ref for it. Spring has to be bootstrapped somehow so use
either the spring plugin and define your action as a spring bean and
reference the service bean as a property of your action or you need to
instantiate Spring using ClassPathXmlApplicationContext or one of the other
Spring context objects.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: RajiR <rajesware99@yahoo.com>
> Reply-To: Struts Users Mailing List <user@struts.apache.org>
> Date: Wed, 27 Feb 2008 22:23:26 -0800 (PST)
> To: <user@struts.apache.org>
> Subject: HOw to send form parameters to dao in struts2 with hibernate?
> 
> 
>  Hi,
> 
> By implementing Preparable,ModelDriven,ServletRequestAware interfaces,am
> able to get the form details and sent those details to service
> implementation layer from an action class.From service implementation i have
> called dao.Since DAO is not injected any where in struts.xml,its throwing
> nullpointerexception.I have used only hibernate.Is it required to use
> springs inorder to inject dao?Or,can I inject using hibernate and struts2
> alone??
> 
> And what is the use of interceptor concept?Does it help to do dao injection
> without using spring?If so,how to use it?
> 
> Plzzzzzzz reply as early as possible.......
> 
> Thanks.
> 
> -- 
> View this message in context:
> http://www.nabble.com/HOw-to-send-form-parameters-to-dao-in-struts2-with-hiber
> nate--tp15730459p15730459.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 



This email and any attachments ("Message") may contain legally privileged and/or confidential
information.  If you are not the addressee, or if this Message has been addressed to you in
error, you are not authorized to read, copy, or distribute it, and we ask that you please
delete it (including all copies) and notify the sender by return email.  Delivery of this
Message to any person other than the intended recipient(s) shall not be deemed a waiver of
confidentiality and/or a privilege.

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


Mime
View raw message