Syntax of an url

A request that is received by the server, has a url that conforms to a certain syntax. There are several component in the generic syntax. See https://en.wikipedia.org/wiki/URL


In Velocity not all components are needed. The relevant components of the syntax are shown in the following image.

The following methods are available in the Request-object ($request), giving the following results with the example from the image.

Method Result
getDomainName() crossmarx.com
getBaseUrl() https://crossmarx.com:942
getPath() /animal/bird
getQueryString() type=eagle
getUrl() /animal/bird?type=eagle



See the Script-API for Request