The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

ramudu (1) [Avatar] Offline
i am using hibetnate with struts.we will write the database connections in hibernate.cfg.xml.but to get the data where we will the code whether in action class or formbeans or anyother
Zolar (2) [Avatar] Offline
Re: please send answer to this question
Dear Ramudu,

You should code all the database connections or hibernate code within the formbeans. As Action class should only control the flow of your web application. For details, you can have a look of the following examples which provided by Oreilly:

(Have a look of the storefront example.)

Have Fun!