This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Struts and the fly likes Design question (struts/mvc) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Design question (struts/mvc)" Watch "Design question (struts/mvc)" New topic
Author

Design question (struts/mvc)

Raj Bhandari
Ranch Hand

Joined: Oct 19, 2005
Posts: 97
Hi All,

Can you please suggest how should I design this. I'm using struts for implementing my mvc design (and I'm new to mvc and struts).

Say, my application has a form1.jsp page for the user to fill.
Now form1.jsp has some fields like dropdowns which get value from database.

form1.jsp (view) will contain struts/struts-el html tags.. but then should I have a Action class (say form1Action.java) just to get dropdown values and then a model which does database work (say form1Model.java).

All this just to populate fields for my forms ?

So basically all my forms which will need dropdowns or some other values from database would need an Action class behind it just to grap the data... is that correct ?

So that means I should not let the user do a form1.jsp directly on the url but make them click on a link that says form1 and use action mapping to map it to form1.jsp so that it always goes thro' my action class.. is that correct ?

Tks
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
That sounds correct to me. Good luck!

- Brent
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Design question (struts/mvc)