I am new to
Struts and have the following observation and question. I count no fewer than 3 ways of passing data from the business tier to a response
jsp page. What is the best way of doing this?
For example: let's say my application receives 2 parameters from a "welcome.jsp" page (via the appropriate ActionForm, call it "welcomeForm"), uses those 2 params in an sql query, and returns the query results to an "answer.jsp"
It seems that,
1. one can set attributes on the HttpRequest using the query results and reference the request from "answer.jsp"
2. create a Data Transfer Object (DTO) JavaBean, populate this bean with the query results, and reference this bean in "answer.jsp"
3. Somehow set params on the "welcomeForm" with the query results and reference the updated form from "answer.jsp"
Are all of these methods valid? Are some better than others? (is, for example, #2 always best? why not?)