Hi Craig,

Thank you for the reply. Point is well taken. I agree with what you say
about using a class that is geared to only one role.

The one thing I didn't get an answer on from anyone yet is how to pass the
same bean used by the forwarded JSP page, to the EJB, and get it back again.
I am not quite clear on this. If I pass in an object, does it come back
changed, or do I have to assign it for it to be changed? If so, do I need to
create a new object (of the same bean instance) to reference the changed
object, and so on.

To elaborate on what I am trying to do, I was thinking that the adaptor
(action) class' purpose is to get the request form data from the page/form
submitted into a javabean, pass this bean as the serialized object parameter
to the EJB, have the EJB use this data in whatever way needed, if it is,
doing the logic and filling this bean with various data (maybe modifying
existing properties, adding new data to empty properties to be used on the
JSP page for display, etc). It then returns this same bean back to the
adaptor class which then puts it in the request or session, and forwards to
the JSP page so it can be displayed (if need be).

Another question which I believe pertains to this. Craig, you already said
to use stateless ejb. So..if I have a multi-page form, in some cases the
next form is built based on the previous forms data, do I store the data
from all these forms on the web-server servlet-container HttpSession? Or is
there some other mechanism for keeping state for a particular client on a
multi-page form?

Lastly, is it good, workable or bad design to use a single bean for multiple
page forms data storage? I am not quite in the know if I should be using a
javabean JUST for get/set operations to "model" the particular data the EJB
will return and the forms will send, or if I should provide any logic in the
beans, even though we are using EJB. My thought is, let the EJB do ALL the
work, and only use the JavaBean as a means for the JSP page to display the
dynamic content...thus it is more of a "data" bean to store data between
requests or during a session.

Thanks.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to