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 to display Map, Notification Properties, and Containment viewlets from within the context of another application. “Additional viewlet properties” on page 38 describes the viewlet parameters to configure a URL-addressable viewlet.

To specify viewlet parameters directly in a URL, use the following syntax:

http://URL?class=viewlet&parameter_name=value[&...]

Class parameter values for URL-addressable viewlets lists values used with the class parameter typically used with URL-addressable viewlets and Separators used in URL-addressable viewlets describes the separators used.

Table 1. Class parameter values for URL-addressable viewlets

Parameter

Dashboard viewlets

class

Determines the Dashboard viewlet that is displayed:

  • com.smarts.webapps.SmWebMapApp(Maps)

  • com.smarts.webapps.SmWebNotificationPropertiesApp(Notification Properties)

  • com.smarts.webapps.SmWebContainmentApp(Containment)

Table 2. Separators used in URL-addressable viewlets

Separator

Description

?

Separates the filename of the HTML page specifying the JAR files from the parameter/value pairs.

&

Separates parameter/value pairs in the URL.

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. The example uses an HTML page included with the viewlet samples. “Example of URL-addressable viewlet” on page 61 provides additional information.

         t
         http://<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, is 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:

         t
          http://<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
      

When necessary, use the dmctl utility to list the notifications in the Global Manager and select the one that you want to use for the viewlet:

./dmctl -s INCHARGE-SA getInstances ICS_Notification