*Struts: *1.3
*Tomcat:* 6.0
*OS:* Mac OS X

Hi,

I have a sample application I am building, and I got it working, but am not
sure that what I have is the best most efficient way to do it.

Here is what I have:

I have a Home Page with several <a href> links, one of which takes me to
Family Members page. The Family Members page is supposed to open already
pre-populated with a simple list of family members take from a DB.

To do that I mapped the URL from the Home Page <a href="/familyMembers.do">
in struts-config, like this

<action path="/familyMembers"
                name="familyMembersForm"
                type="com.vhousehold.struts.actions.FamilyMembersAction"
                scope="session">
            <forward name="success" path="/WEB-INF/JSP/familyMembers.jsp"/>


In the FamilyMembersAction class above, I use a DAO to get the information,
but then I put it in the request object as a regular attribute and have the
familyMembers.jsp display it.  This means I am not using the FORM at all.

This works, but is there a better way to do it with Struts? The question is:
the jsp page is not an HTML form; it just displays information - can I use
the form for this purpose though, and if so, should I?

Thanks,

Reply via email to