Share this page 

Use EJB from JSPTag(s): Servlet/JSP


EJB with constructor with no parameter
<jsp:useBean id="myBean" scope="session" class="com.company.MyBean"/>
EJB with constructor with parameters
<%
    com.company.MyBean bean=new com.company.MyBean(1, 2, 3, 4);
    session.putAttribute("myBean", bean);
%>