This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
I am a newbie programmer and I am trying to learn struts by building small applications. I have created a form to accept username and passowrd. I chek the value entered by user against database. I am using hibernate for this. I have all my calls done inside execute method. I feel this may not be the way it is done in real projects. Am I right? if yes, pls guide me about the classes I need to build to totally separate my data access logic from my struts action code.
All the Struts projects that I have worked on have used an EJB tier to implement the business logic. These days Spring seems to be more in favor than EJB (though EJB has it strengths and EJB 3.0 is supposed to be pretty slick). Depending on the requirements of your project you may want to look into EJB or Spring. In any case it probably makes sense to move out logic like validating login information out of your Action class and into a reusable class that could be access from multiple actions.