Unwired Accelerator enables skilled users to enhance its capabilities quickly and easily without code-level changes using JSP. Unwired Accelerator sits within a JSP container (Tomcat, EAServer, or other suitable servlet container), so the framework for calling out to user-provided JSP is already in place. Unwired Accelerator provides hooks to allow users to insert a JSP component where needed.
Typically a JSP interacts with UA via request attributes, which are presented to the JSP when it is invoked; the JSP performs an operation, and returns results via the same or other well-defined attributes.
Because a JSP is invoked within the context of the servlet
session, and in the same JVM as UA, there are issues about security,
reliability, and so on. Sybase recommends these JSPs only be added
by suitably authorized personnel, and only at development time.
See the Unwired Accelerator Administration Guide for
information about security.
Following is a summary of ways you can add JSP capabilities in Unwired Accelerator:
Definition time
Web Services definition – this occurs when creating “advanced” web services only.
CGI Parameter definition – this occurs when creating “advanced” web services only.
Execution time
CGI parameter pre-processing – when using server-side, click-across.
CCL execution
Data extraction/generation
Page Content processing – during page loads from remote web sites.
XSLT – when processing XML using XSLT. Currently only possible to set this up with ‘advanced’ web services unless you edit the CCL directly.
Web Services – during “advanced” web services only.
JSP - for JSP-elements.
Feature extraction
Custom parsing – to perform custom feature extraction on HTML pages.
SetupPage – allows developers to replace the standard input fields on a parameter-driven application with their own.
Post-processing – provides developers with the ability to control any template processing. No current implementation.
Mobile Device Template – this template is used to generate output targeted at a particular mobile device. These are JSPs that process (intermediate) output generated during application playback when we are routing the playback to a mobile device. When defining an application, you can associate different templates for different device types. If the template type is “JSP” then UA will generate content in a form that is compatible with mobile device templates.
In general, for template types of HTML/XSL, it is possible to get the template processor to invoke a JSP to generate the template content. For example, assume you have an XSL template; you have these three choices for defining the template body:
Simply insert XSL content into the template body.
Indicate a path to a JSP—such as /portlets/jsp/custom/some.jsp—that generates XSL, into the template body
Make sure the template body starts with <%
,
and then the template body is executed as a JSP that generates XSL.
In this case the template body is the JSP content.
This pattern is also available for HTML templates. This means that you can get the template body output generated via a JSP, either by pointing at a JSP or by including the JSP content directly into the template body.
See Chapter 6, “Building Templates” for
information about creating various types of templates.