Sun GlassFish Web Space Server 10.0 Secure Web Access Add-On Guide

Rewriter Usage Scenarios

When a user tries to access intranet web pages through the Gateway, web pages are made available by using Rewriter. Rewriter is used by the URL Scraper and the Gateway.

URL Scraper

The URL Scraper provider gets content from configured URIs. Before sending these URIs to the browser, it expands all relative URIs to absolute URIs.

For example, if a user is trying to access a site as:

<a href="../mypage.html">

Rewriter translates this to:

<a href="">

where is the base URL of the page.

See the Sun Java SystemPortal Server Administration Guide for details about the URLScraper provider.


The Gateway obtains content from Internet portals. Before sending the content to the browser, it prefixes the Gateway URI to the existing URI so that subsequent URI requests from the browser can reach the Gateway.

For example, a user who is trying to access an HTML page on an Internet machine as:

<a href=">"

Rewriter prefixes this URL with a reference to the Gateway as follows:

<a href=" mypage.html>"

When the user clicks a link associated with this anchor, the browser contacts the Gateway. The Gateway fetches the content of mypage.html from

The Gateway uses several rules to determine the elements of a fetched web page that will be rewritten.