Portlet Factory, Version 6.1.2
Using an LJO as a Bean input to a JSP tag
You can use the Shared Variable builder to export an LJO to the session or request so it can be used by a JSP tag or custom taglib call. To do this, add a Shared Variable builder to a model and select the LJO's name (for example, "myBean") as the Variable input value.
Use either Session or Request as the Scope input value. In your page, you include code similar to the following to access the LJO:
<jsp:usebean id="myBean" class="com.mycompany.myBeanClassName" scope="session" /> <jsp:getProperty name="myBean" property="customerName" />Note: Classes that are shared with JSP code must be available on the classpath for the WebApp. Code that is compiled into work/classes is usually loaded by the IBM® WebSphere Portlet Factory's dynamic class loader, which is not available to the application server. You can work around this by putting your LJO classes under WEB-INF/classes, or in a JAR in WEB-INF/lib.
Parent topic: Shared Variable builder
Library | Support |