This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one 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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts steps" Watch "Struts steps" New topic
Author

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.

Thanks
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30356
    
150

Kalpana,
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.)


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, 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
Sheriff

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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30356
    
150

Marc,
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
Greenhorn

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts steps