Filter Class Name: atg.portal.servlet.DeviceFilter

The Device Filter creates and initializes the Portal request’s DEVICE attribute. The mimeTypes property is derived from the HTTP accept header. The preferred MIME type is determined by matching the Device Filter’s mimeTypePreferences parameter to one of the accept headers, using a regular expression.

For example, if the mimeTypePreferences parameter in the Device Filter is set to:

text/html
text/vnd.wap.wml
text/xml

And the request contains the following accept headers:

text/*
image/jpeg
image/png
image/*
*/*

then the preferred MIME type will be text/html.

The following attribute is set when the filter is invoked.

DEVICE

A reference to the Device object.

Device Filter Parameters

The following init parameter can be used to control the behavior of the Device Filter:

Parameter

Description

Default

mimeTypePreferences

A list of MIME types to serve, ordered by MIME-type preference.

text/html
text/vnd.wap.wml
application/vnd.wap.wml
text/xml
application/xml
application/xhtml+xml

 
loading table of contents...