Portlet Factory, Version 6.1.2
Overview: working with Java
IBM® WebSphere Portlet Factory applications rely on Java for all their application logic.
You can incorporate Java into your application in the following ways:
- Use the Method builder to create model-specific Java methods.
- Use the Linked Java Object builder to expose the public methods of an existing Java class to your model.
- Use the ${Java/...} indirect reference to set the value of a builder input to the value returned by the specified method.
Parent topic: Developing Web applications
- Writing methods
Methods do the work of processing form inputs, executing other parts of the web applications (even other web applications), and performing any other logic that the WebApp requires to function the way you want it to.
- WebAppAccess
The WebAppAccess is the programmer's interface into the running application.
- Processing form submissions
LJO Methods and Method builder calls access inputs submitted by FORM POST or URL query parameters, by the RequestInputs interface, or direct arguments to the method.
- Getting and setting variable values
You can access all of the variables in the web application by calling the webAppAccess.getVariables() method.
- Executing model actions
This information describes how to execute model actions.
- Generating URLs to model actions
You can generate the URL for actions in the current model or in another model.
- Interacting with the session object
You can store objects in the session by setting attributes on the session and specifying the value for those attributes as the objects that you want to share between models.
- Dynamic class loading
Java classes may be dynamically loaded from the directory or directories specified in the bowstreet.dynamic.class.load.path property.
- Modifying the response
Use the HttpServletResponse object to modify the content type of the data returned by a method.
- About getting data from the request
You can access the HttpServletRequest object by calling the webAppAccess.getHttpServletRequest() method.
- Getting system properties
You can get the values of IBM WebSphere Portlet Factory properties stored in the cluster.properties and bowstreet.properties files.
- Java/XML Converter builder
Use the Java/XML converter to transform the public fields of one or more Java objects into an XML variable.
Library | Support |