You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tuncay Baskan <tb...@superonline.com> on 2002/06/13 19:25:42 UTC

Starter question

Hello everyone,

I'm a beginner for Struts and can't still figure out how to do simple
things with the framework.

My difficulties are generally related with MVC, I think.

For traning, I want to accomplish probably the easiest dynamic page for
a web application: a page that shows some portion of a database table.

To my understanding, I need the following:
 1. a model object must have a static method that fetches rows 
    from the database table and puts them in a Collection object.
 2. a JSP page containing <logic:iterate> tags to iterate over this
    Collection.

Now.. My real problem is how to attach these together.

I decided to do this with an Action. I mean, when user hits a page like
/myapp/groupList.do, the Action's perform method gets the Collection
from model and sets it as a PageAttribute. But failed. Every <action> in
configuration file needs a "name" property, which is an ActionForm. Do I
need an ActionForm in this case?

I need some enlightening.

/tb.






--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>