Sun Java System Portal Server 7.1 Technical Reference

Chapter 2 Rewriter Service

The Rewriter service provides a Java class library for rewriting URI (Uniform Resource Identifier) references in Web languages such as HTML, JavaScript, and WML (Wireless Markup Language), and in HTTP Location headers (redirections). For example, the Rewriter rewrites relative URIs of image tags so that the browser requests the images from the appropriate server. The Rewriter also functions in the Portal Gateway. For example, the Rewriter rewrites HTML links to provide access to an internal server. The Rewriter service is available as a Rewriter Rulesets tab listed in the Secure Remote Access (SRA) feature in the Portal Server Administration console.

The topics in this chapter that describe the Rewriter Service are:

Rewriter Tab Tasks

You can perform the following tasks from the Rewriter tab in the Gateway Profile menu bar:

ProcedureTo Enable Rewriting of All URIs

  1. Select the Enable option in the Rewriting of All URIs attribute to enable the Gateway and to rewrite all URIs.

  2. Click Save to record the change.

ProcedureTo Specify the URIs Not to Rewrite

Before You Begin

The prerequisite to map a URI to a Ruleset, to specify MIME (Multi Purpose Internet Mail Extensions) mappings, to specify the URIs not to rewrite, and to configure Rewriter proxies, specify one or more configuration attributes. See the http://docs.sun.com/app/docs/coll/1303.1 for more information on configuration attributes.

  1. Navigate to the URIs Not to Rewrite attribute, and specify the URI in the text box.

  2. Click Add to add the URI in the URIs Not to Rewrite list.

  3. Click Save to record the change.

ProcedureTo Map a URI to a Ruleset

  1. Navigate to the Map URIs to RuleSets attribute and map a URI to the appropriate RuleSet.

  2. Click Save to record the change.

ProcedureTo Specify MIME Mappings

  1. Navigate to the Map Parser to MIME Types field, and map a Parser to the appropriate MIME type.

  2. Click Save to record the change.

ProcedureTo Configure Rewriter Proxies

  1. Select the Enable option in the Rewriter Proxy attribute to enable the Rewriter proxy.

  2. Specify the Rewriter Proxy value in the Rewriter Proxy List attribute text box.

  3. Click Add to add the value in the Rewriter Proxy List.


    Note –

    The Rewriter Proxy attribute is available in the Rewriter Proxy and Netlet Proxy option in the Deployment tab of Gateway Profile.


  4. Click Save to record the change.

Rewriter Rulesets

Rewriter Rulesets is a service, which is available as the Rewriter Rulesets tab in the Secure Remote Access tab of Portal Server Administration console. When you click the tab, the Rewriter Rulesets page is displayed. The Rewriter Rulesets page lists the available rulesets in the Gateway. Each ruleset is a file that defines how the contents in a Web page should be rewritten by the Rewriter attributes. You can download an existing ruleset, upload a new ruleset to the list, and delete an available ruleset from the list. You can perform these tasks as follows:

ProcedureTo Download a Ruleset

Before You Begin

The prerequisite to perform these tasks is to specify one or more configuration attributes . See the http://docs.sun.com/app/docs/coll/1303.1 for more information on configuration attributes.

  1. Select a ruleset from the Gateway Rulesets list.

  2. Click Download.

    You can save the ruleset or open and view in the default Web browser.

ProcedureTo Upload a Ruleset

  1. Click Upload New.

    The Upload New Ruleset page displays.

  2. Click Browse to choose the ruleset to upload.

  3. Click Upload.

ProcedureTo Delete a Ruleset

  1. Select a ruleset from the Gateway Rulesets list.

  2. Click Delete.