Parameters

name string Resource key, e.g. nms:task.png.
mode string Routing mode, e.g. reverse_img for an image URL.

Returns

string The resolved URL, e.g. /nms/img/task.png.

Examples

NL.route turns a resource key into the URL that serves it, so a web app or JSSP never hardcodes an instance path. It is most often used to resolve an icon by its nms: key for an enumeration <img>.

It is a browser-side helper of the NL namespace, available in web apps and JSSP-rendered pages.

var imgUrl = NL.route("nms:task.png", "reverse_img"); // "/nms/img/task.png"

Wrap it in a personalization block (<%= NL.route(...) %>) to emit the URL into the page markup.

See also

  • 📕 request - The HttpServletRequest object — read query parameters, body, headers and client info in a JSSP.