URI pattern

A URI pattern is a notation that is used to match a URI. It is used by Berlioz to determine which service should be triggered when receiving HTTP requests.

Basic syntax

The URI pattern notation follows the URI template notation.

When a URL matches a pattern, values matching tokens can be saved as variables that are passed on to the Berlioz servlet.

Example

The URI pattern below

/user/{username}

Would match the following URLs:

URLMatches'username' variable
/user/Non/a
/user/testYestest
/user/jsmithYesjsmith
/user/jsmith/detailsNon/a

Berlioz

Berlioz only matches part of path component of the URL against the URI pattern called the Berlioz path.

When using the standard mapping, it is simply the path within the application without the file extension.

For example, if the user requests the URL below:

http://localhost:8099/user/jsmith.html?action=refresh#details
\___________________/\__________/\___/ \____________________/
      ignored            path     ext         ignored

Berlioz will only attempt to match /user/jsmith again the URI pattern.

Created on , last edited on