Thanks Craig and Bojan
I always kept the module 2 in mind, as well as efficiency. Using
JSP for presentation, forward request to Servlet, then forward to
EJB, and the same procedure back involves lots of overhead.
Using JSP for presentation, invoke a JSP bean, and from that
bean to EJB... I think this is also module 2, but may be faster.
Using JSP for presentation, doing something else.... to EJB.. ? I am
eager to see this example. If it is not available, I would like to
see some examples of the JSP-->JPS Bean-->EJB solution.
Thanks again
On Wed, 12 Sep 2001, Bojan Smojver wrote:
> Huaxin wrote:
> >
> > A little bit off topic, sorry about that.
> >
> > I see most of the examples using EJB from Servlet.
> > However, is there any example of using JSP with
> > EJB directly? (without too much scriplet, and
> > hopefully more efficient than create a bean to
> > interact with the EJB)
> >
> > thanks a lot
>
> Every JSP eventually becomes a servlet, so there shouldn't be any
> technical difficulties in doing that.
>
> But, is this really the design you want to have? Embedding EJB call
> machinery into JSP will make the code contain a lot of the stuff that
> has nothing to do with presentation. Unless, of course, you're using the
> JSP's for non presentational purposes here... But if you do, then
> straight servlets or beans are a better choices anyway, therefore the
> lack of examples :-)
>
> Here is an article that explains the Model 2 architecture:
> http://www.javaworld.com/javaworld/jw-12-1999/jw-12-ssj-jspmvc.html
>
> Bojan
>