Hi,

So, I was thinking, and I need some help in "opinions" on this. By following
what we have said thus far, let me recap on the way flow follows:

- Browser submits form.
- Form is sent to controller servlet
- controller servlet derives "action" from request object, (I use
request.getRequestURI(), but I think that is due to Servlet 2.2??)
- controller servlet calls (or dynamically loads if not yet loaded in JVM)
the class that matches the lookup of the action name.
- action class perform logic
- action class populates javabean with info
- action class forwards to jsp page
- jsp page displays results.

Give or take a few steps in how things get done, I believe this is the
syntax we are all using, right?

Now, lets all assume we are using EJB as the "logic", so the action class
would implement code to create and/or get the EJB, pass to it the request
data needed by the EJB, and the EJB would somehow return results back. I
proposed using the same JavaBean the JSP page uses to display content, as
the one that goes to the EJB.

Let me back-track one step..the action class would first "get" the request
object form data out of it, and into a javabean. Then, it calls the EJB
passing to it either this JavaBean (my proposed method) or a serialized
class of some sort that contains the information from the request that the
EJB needs to do its work. Upon returning the class, or another new one
(which is it?) would contain the results, which would then be put into the
JavaBean, and then forwarded to the JSP page for viewing.

My confusion right now is why we implement the "same" properties in both EJB
and JavaBean. Let me rephrase this a bit to apply it to my non-EJB based
site right now. We have "sessions" that are classes that contain our logic,
and we have classes that model specific items, such as an Enrollee, User,
Buyer, etc. Enrollee is used on the Enrollment page. Is it better to model
the entire enrollee object as a JavaBean, and eliminate the use of the
Enrollee object (which is currently part of our "core" code), or should I
leave it as I have it now, which is use the Enrollee object in my javabean
(as a reference to it), AND add some properties for various uses. Or should
I juse USE the Enrollee object as the javabean and do away with the other
JavaBean?

More to follow..but enough for now.

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