Creating the Web Client

The Web client is contained in the JSP page j2eetutorial/examples/src/ejb/converter/index.jsp. A JSP page is a text-based document that contains static template data, which can be expressed in any text-based format such as HTML, WML, and XML; and JSP elements, which construct dynamic content.

Coding the Web Client

The statements (in bold in the following code) for locating the home interface, creating an enterprise bean instance, and invoking a business method are nearly identical to those of the J2EE application client. The parameter of the lookup method is the only difference; the motivation for using a different name is discussed in Specifying the JNDI Names (page 35).

The classes needed by the client are declared ...

Get J2EE™ Tutorial, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.