This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts steps Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts steps" Watch "Struts steps" New topic

Struts steps

kalpana Kumar
Ranch Hand

Joined: Jul 03, 2003
Posts: 65
Hi all,
I have been working with JSP's for a while. My current project is designed to be implemented using STRUTS. I want to know the steps I have to follow. I have got the screens from UI team.
Should I write the JSP's first before the formBeans and DTO's?.
Some documents emphasise on writing the DTO's, Business Delegate, Form Bean and finally JSP.
Few others start with JSP, Form Bean, DTO and Business Delegate.
The result could be achieved either way. But I would like to know which is the appropriate approach.
I appreciate any suggestions.

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32815

It is a matter of personal preference. I usually do the JSPs last because I like to create my model first.

Regardless of which approach you choose, you need to start by thinking of the interactions (form input and JSP output.)

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
kalpana Kumar
Ranch Hand

Joined: Jul 03, 2003
Posts: 65
Thanks a lot Jeanne . I was expecting a suggestion.
Marc Peabody
pie sneak

Joined: Feb 05, 2003
Posts: 4727

My least stressful projects have been where you start at the front and then the back and then meet in the middle.

Here is how I recommend proceeding at the front:

It's good to make a prototype using jsps with simple html and let the users see it. You can avoid a lot of later (and costly) changes by doing this. Set up the jsps so they are backed by Struts navigation but do not yet do anything useful with the information submitted. Next I recommend adding the Struts' html tags and backing them with the appropriate accessor methods and validations in the ActionForms.

A good workman is known by his tools.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32815

I completely agree that it is important to have some screens first. Kalpana mentioned they have screens from the UI team. We do the same in my organization. If no screens were available it would be essential to start there.
lee honw

Joined: Dec 14, 2004
Posts: 11
1、Create a JavaBean with properties, getters, and setters.
2、Create JSPs with input forms and convert JSP tags to Struts HTML tags. 3、Update the <action> property of a Struts HTML form tag to point to the Action class.
4、Use the Action and ActionForm wizards to create Struts Action and ActionForm classes from the backing JSP.
5、Add code to the Action class execute() method that returns the forward mapping.
6、Use the Struts Action designer to add a forward to an Acti
subject: Struts steps
It's not a secret anymore!