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

Reply via email to