A URL-addressable viewlet is a viewlet that is displayed when a web client loads a particular URL. This enables you to dynamically generate a URL that displays the Map, Notification Properties, or Containment viewlets.
The base URL for displaying a viewlet is: http://<tomcat_host>:<port>/templates/context.html
This sample uses context.html as the base URL to load the JAR files necessary to display one of these three viewlets. At a minimum you must specify the type of viewlet to display.
Opening this page without specifying a viewlet displays a blank page.
Additional viewlet properties on page 38 describes parameters and separators you can add to the base URL. URL-addressable viewlets on page 48 provides additional information on the syntax of URL-addressable viewlets.
The following URL is an example of a URL-addressable viewlet that loads a map viewlet with a specific element class and instance as the focus. It does not specify a map type:
thttp://<tomcat_host>:8080/templates/context.html? class=com.smarts.webapps.SmWebMapApp& com.smarts.propertiesFile=dashboard.properties& com.smarts.launch.class=Router& com.smarts.launch.instance=lab-gw.example.com s
The following URL, which is similar to the preceding, provides an example of a URL-addressable viewlet that loads a Map viewlet with a specific element class and instance as the focus, and specifies a map type:
thttp://<tomcat host>:8080/templates/context.html? class=com.smarts.webapps.SmWebMapApp& com.smarts.launch.mapType=IP& com.smarts.launch.class=Host& com.smarts.launch.instance=qa-fancy s
The following URL provides an example of a URL-addressable viewlet that loads a Notification Properties viewlet. In the example, the class (optional) is ICS_Notification, and the instance is the name of the notification.
thttp://<tomcat host>:8080/templates/context.html? class=com.smarts.webapps.SmWebNotificationPropertiesApp& com.smarts.launch.class=ICS_Notification& com.smarts.launch.instance=NOTIFICATION-Router_qa-mplspe4.example.com_Unresponsive s
The following URL provides an example of a URL-addressable viewlet that loads a Containment viewlet. The parameters for the Containment viewlet are the same as for a map: the class of the element and the instance name of the element.
thttp://<tomcat host>:8080/templates/context.html? class=com.smarts.webapps.SmWebContainmentApp& com.smarts.launch.class=Router& com.smarts.launch.instance=qa-mplspe4.example.com s