JSP filters allow you to write custom code to post-process application content using programming. When you create JSP filters, you look at an application’s content, enter the Java code to transform the content in any way you want, then save the code as a JSP template, which you can later select for post-processing.
Selecting a JSP filter
Log in to Mobile Web Studio and select Build | Applications from the menu in the left pane.
In the detail pane, right-click the application to which you want to add post-processing and select Edit from the pop-up.
When the Application Builder displays, right-click the application to which you want to add a JSP Filter and select Create JSP Filter from the pop-up.
The JSP Editor appears with a preview of the application.
Complete these options:
JSP Template – enter the name of an existing JSP template you want to use or click Select to search for a template using the Find JSP Template dialog box.
Click Search to display existing approved JSP templates. When the list appears in the Results pane, select:
New – to create a new JSP template.
Edit – to modify the template selected in the Results pane.
Select – to choose the template selected in the Results pane.
Preview – to preview the template selected in the Results pane.
Apply JSP Filter to XML Playback – select this option to apply the filter only when the application’s content is returned as XML. When this option is not selected, which is the default, the filter is applied only when the application’s content is returned as HTML.
When applications are played back, they return their
content in either HTML or XML. Whether HTML or XML is returned is determined
by the entity making the request.
For example, when Portal Interface requests that application A be played back, the output is requested as HTML. When an agent requests that sample application A be played back, the output is requested as XML. When you create a JSP filter and attach the filter to an application for postprocessing, the developer uses this option on a case-by-case basis to apply or not apply the JSP filter during application playback.
Click Finish to associate the JSP Filter with the selected application.
You can add more than one JSP filter as post-processing elements on an application and you can apply the same JSP filters to numerous applications. When the JSP filters have been added, the application is saved under the same version, regardless of how the global versioning property is set. Once you assign a JSP filter for application postprocessing, the filter is listed in the Application Builder under the application name.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |