Adding JSP Filters

JSP filters allow you to write custom code to postprocess mobile application content using programming. When you create JSP filters, you look at a mobile 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 postprocessing.

  1. Right-click the mobile application to which you are adding a JSP filter and select Add Post Processing|JSP Filter.

    The JSP editor appears with a preview of the mobile application.

  2. Complete these options and click OK:

    • JSP Template – click Add and enter the name of an existing JSP template to use, or click Search to search for a template using the Select JSP Template dialog box.

      When the list appears in the Results pane, highlight the template you want to add.

    • Apply Filter to XML Playback – apply the filter only when the mobile application's content is returned as XML. When this option is not selected, which is the default, the filter is applied when the mobile application's content is returned as HTML.

      When mobile 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 Unwired Accelerator requests that mobile application A be played back, the output is requested as HTML. When an agent requests that sample mobile application A be played back, the output is requested as XML. When you create a JSP filter and attach the filter to a mobile application for postprocessing, the developer uses this option on a case-by-case basis to apply or not apply the JSP filter during mobile application playback.

  3. Click Finish to associate the JSP filter with the selected mobile application.

You can add more than one JSP filter as postprocessing elements on a mobile application and you can apply the same JSP filters to numerous mobile applications. When the JSP filters have been added, the mobile application is saved under the same version, regardless of how the global versioning property is set.

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com