File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Design question (struts/mvc)" Watch "Design question (struts/mvc)" New topic

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 just to get dropdown values and then a model which does database work (say

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 ?

Brent Sterling
Ranch Hand

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

- Brent
I agree. Here's the link:
subject: Design question (struts/mvc)
It's not a secret anymore!