struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RajiR <rajeswar...@yahoo.com>
Subject Re: HOw to send form parameters to dao in struts2 with hibernate?
Date Thu, 28 Feb 2008 10:41:35 GMT

Thanks for the reply..

Actaully am able to call dao layer from my service implementation and able
to insert values into db with and without using springs.Its working fine in
both scenarios.
          NExt i need to authenticate this registered user and should log
in.Trying this and vill get back to forum if struck up anywhere.

sarat.pediredla wrote:
> 
> RajiR,
> 
> How is the service implementation layer being instantiated? 
> 
> The best way is to use the Spring plugin as defined at
> http://struts.apache.org/2.0.11/docs/spring-plugin.html to inject objects
> into your actions manage dependancy injection.
> 
> For more on interceptors and what they do, see
> http://struts.apache.org/2.x/docs/interceptors.html for detail.
> 
> Finally, might be worth having a read through the manual at
> http://struts.apache.org/2.x/docs/core-developers-guide.html which
> although aimed at devs, has a good insight into the framework.
> 
> 
> RajiR wrote:
>> 
>>  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-hibernate--tp15730459p15733658.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


Mime
View raw message