Sun Java System Portal Server Secure Remote Access 7.2 Administration Guide

ProcedureTo Specify MIME Mappings

Rewriter has four different parsers to parse the web pages based on the content type: HTML, JAVASCRIPT, CSS and XML. Common MIME types are associated with these parsers by default. You can associate new MIME types with these parsers in the Map Parser to MIME Types field of the Gateway service. This extends the Rewriter functionality to other MIME types.

Separate multiple entries with a semicolon or a comma (";" or ",".) For example:

HTML=text/html;text/htm;text/x-component;text/wml; text/vnl/wap.wml

means any content with these MIMEs are sent to the HTML Rewriter and HTML rules would be applied to rewrite the URLs.


Tip –

Removing unnecessary parsers from the MIME mappings list can increase the speed of operation. For example, if you are sure that the content from a particular intranet will not have any JavaScript, you can remove the JAVASCRIPT entry from the MIME mappings list.


  1. Log into the Portal Server administration console as administrator.

  2. Select the Secure Remote Access tab, and select the gateway profile for which you want to set the attribute.

  3. Select the Rewriter tab.

  4. Under Rewriter Option, click Map Parser to Map MIME Types .

    Specify the entry in the format HTML=text/html;text/htm

  5. Click Add Row to add the entry to the list. Enter the parser value and corresponding MIME value to map to in the MIME Type filed.

  6. Click Save to complete.

  7. Restart the Gateway from a terminal window:


    ./psadmin start-sra-instance –u amadmin – f  <password file> –N <profile name>– t  <gateway>