The applet and its supporting client-side classes are referenced through an applet tag embedded in an HTML or JSP paqge. The tag must include references to both the fully qualified applet and to the location or codebase where it an supporting classes are stored. This last reference, of course, is a path to the directory structure described above.Below is an example of such an applet tag:
<jsp:useBean id="sessionBean" scope="session" class="jbs.abapplet.databean.SessionBean"/> <% String sessionId = sessionBean.getSessionID(); %><APPLET CODE = "jbs/abapplet/applet/AppletAB.class" CODEBASE = "/ABApplet/abapplet/applets" WIDTH = "600" HEIGHT = "800" JSESSIONID = "<%= sessionId%>" scriptable=false />
The project name, ABApplet in this case, will, of course, need to be changed to the appropriate context, such as jbs.
In applications where the applet is loaded from the same context as the preceding HTML or JSP pages, the tag will not need to include the JSESSIONID; this code is shown here as additional material for those examples in which it is needed.