4.0

Table Of Contents
Procedure
1 Create an index page for the configuration tab that implements the JavaServer Pages Standard Tag Library
(JSTL).
The index page must refer to the JSTL definition.
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
2 Create a Web application definition XML file that provides information about the plug-in to the
Orchestrator configuration server.
The Web application definition file references the XML schemas, locates the index page, accesses resource
files, and implements security.
3 Create a JSP page that defines the layout and contents of the configuration tab.
The configuration tab can include any types of buttons, forms, lists, or menus that JSP provides.
The solar system configuration tab includes a button that the user can use to set the
plutoClassifiedAsAPlanet property to designate Pluto as a planet or a dwarf planet, a list from which
they can select their home planet from the allPlanets properties list, and a save button that calls a Struts
action named ConfigureSave.
<div id="c_content">
<s:form action="ConfigureSave" method="POST" validate="true">
<s:radio key="select.pluto.classify.text" name="plutoClassifiedAsAPlanet"
list="plutoClassifyList"/>
<s:select key="select.home.planet" list="allPlanets" listValue="name" listKey="id"
name="homePlanet"/>
<s:submit type="input" key="save.button"/>
</s:form>
</div>
4 Create a Struts configuration file that implements the Struts framework to pass to the configuration server
the configuration information that the user enters.
The Struts configuration file in the solar system example implements the OpenSymphoyOpenSymphony
XWork2 ActionSupport class to pass the results of the ConfigureSave action to the Struts framework. The
ConfigureSave action calls the SolarSystemConfigureAction.save() method.
<action name="Default" class="com.opensymphony.xwork2.ActionSupport">
<result name="success" type="chain">Configure</result>
</action>
<action name="Configure"
class="com.vmware.orchestrator.api.sample.solarsystem.config.SolarSystemConfigureAction">
<result name="success">/WEB-INF/pages/configure.jsp</result>
</action>
<action name="ConfigureSave"
class="com.vmware.orchestrator.api.sample.solarsystem.config.SolarSystemConfigureAction"
method="save">
<result name="success">/WEB-INF/pages/configure.jsp</result>
</action>
Chapter 7 Developing Plug-Ins
VMware, Inc. 199