You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Craig R. McClanahan" <cr...@apache.org> on 2001/09/12 03:26:31 UTC

Re: JSP/Servlet <-->EJB


On Wed, 11 Sep 2002, Huaxin wrote:

> Date: Wed, 11 Sep 2002 18:53:04 -0600 (Mountain Daylight Time)
> From: Huaxin <hx...@cs.ualberta.ca>
> Reply-To: tomcat-user@jakarta.apache.org
> To: Tomcat User List <to...@jakarta.apache.org>
> Subject: JSP/Servlet <-->EJB
>
> 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)
>

You could use beans or custom tags to interact with an EJB from inside a
JSP page.  However, wanting this leads me to believe that you wish to
intermix business logic and presentation logic in the page -- a practice
that is discouraged by the "Model 2" architectural approach recommended by
most web application frameworks.  An example of a framework that lets you
maintain this separation is Struts <http://jakarta.apache.org/struts/>.

> thanks a lot

Craig