struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Balahura" <rj-ba...@sciborg.uwaterloo.ca>
Subject Struts Design Question - New User
Date Mon, 19 Jun 2000 07:19:23 GMT
Hello struts users,

I am just getting my feet wet using the framework and I want to ask for
advice to help get started.

I have listed below my beginning architecture for one task and then a
question afterwards. The task is to display a list of products from my
database based on a user's query.  This is the architecture so far.  [I am
starting out using my ActionClass also as my business logic bean for this
test, but I will separate them later]

The HTML form is submitted to the ActionServlet controller, the
ActionServlet controller instantiates an ActionClass based on the action.xml
mapping.  My ActionClass takes a connection from my connection pool (taken
from ServletContext).  My ActionClass then performs the query to the
database and gets a "Collection" of "Product" objects that satisfies the
query.  Let's say there are 40 "Products" in the "Collection" as a result of
this query. I then put this "Collection" in the "Session" and forward
control to the appropriate JSP page to display the "Collection" of
"Products".

My questions:
What is a good technique if I only want to display 10 Products per page?
Would I resubmit to the ActionServlet after a "Next" button is pushed, or
would I submit to the same JSP page itself and manipulate a catalog index
inside the JSP page using the same object?

Is it OK to store the entire "Collection" of "Products" in my session
object, or what are the alternatives?


Thank-you for any assistance,

Rob


Mime
View raw message