Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts steps

 
kalpana Kumar
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34422
347
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.)
 
kalpana Kumar
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Jeanne . I was expecting a suggestion.
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34422
347
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic