Struts is the most reliable and most efficient framework to design the enterprise applications. The good way of reusing the code will improve the maintanance of the application.

Here is the sample structure of the Application:

formbeans: which stores the form data of the user

dto : The form we used for our business logic. It is recomonded to have no int etc. variables in form beans as it leads to conversion of user data which may fail if user enter wrong data. So we move this validation part to our dto's. All the fields of dto are clones of form beans except the return type.

mapper: these will map the form bean data to dto. We can use copyproperties() method of BeanUtils class to copy the data from form bean to dto.

actions: This package contains all the acction classes

dao: This package contains the Interfaces to invoke the backend data

dao-implementation: This package is the implementation of dao package.

service: This package is used to access the backend logic from our actions etc.

All jsp pages should go under some other directory either under root or WEB-INF.

Like it on Facebook, Tweet it or share this article on other bookmarking websites.

Comments (0)

There are no comments posted here yet

Is number 7 lucky for Dhoni?

Team India Captain Mahendra Singh Dhoni has always had an association with the number 7, but is it really lucky for him?
No answer selected. Please try again.
Please select either existing option or enter your own, however not both.
Please select minimum 0 answer(s) and maximum 2 answer(s).
/polls/sports-and-games/5968-is-number-7-lucky-for-dhoni.json?task=poll.vote
5968
radio
[{"id":"20556","title":"Yes","votes":"68","type":"x","order":"0","pct":78.16,"resources":[]},{"id":"20557","title":"No","votes":"19","type":"x","order":"0","pct":21.84,"resources":[]}] ["#ff5b00","#4ac0f2","#b80028","#eef66c","#60bb22","#b96a9a","#62c2cc"] ["rgba(255,91,0,0.7)","rgba(74,192,242,0.7)","rgba(184,0,40,0.7)","rgba(238,246,108,0.7)","rgba(96,187,34,0.7)","rgba(185,106,154,0.7)","rgba(98,194,204,0.7)"] 350
bottom 200
No married couple wants to end up getting divorced. It is not like they have planned for it. They try to put up with their partners for as long as they
Due to our modern lifestyle, we feel that digestion related disorders are a common problem. Thus, we neither give importance to them nor seek any help
The bond of marriage brings the two people together. Initially, everything may seem okay and both of them slowly start discovering each other in the journey.
Why to choose Java? In the computer market, being able to use Java is a crucial knowledge. Java is a development terminology used to build compelling
DATABASE CONNECTIVITY This articles explains the need of database connectivity, the way it is achieved through Java using the JDBC(java database connectivity)
  Write your first simple java program.   First of all we need is a placewhere we can write your Java code. All Java programs are written using
Array of objects in Java Arrays are defined as block of continous memory locations which are arranged in one after another. Elements of the Array can
Synchronized block is alternative mechanism for "synchronized" methods.If we inherihate the non synchronized blocks either from base class or interface