InfoCenter Home > 6.6.0.2.1.1.2: XMLConfig - Example of a partial exportTo do a partial export of your Websphere Administrative Domain configuration into an XML file, you need to create an XML file specifying the resources you would like to export. This partial file is then used as an input parameter in the XMLConfig export command line. The partial XML file always begins with the following two header lines: <?xml version="1.0"?> <!DOCTYPE websphere-sa-config SYSTEM "$server_root$$dsep$bin$dsep$xmlconfig.dtd" > The contents of the Websphere Administrative Domain that you wish to extract into an XML file start with <websphere-sa-config> and end with </websphere-sa-config>. What goes in between these tags depends on what you want to export. This is an example of a partial XML file you would create to export the entire contents of an Application Server on a node named "mynode": <?xml version="1.0"?> <!DOCTYPE websphere-sa-config SYSTEM "$server_root$$dsep$bin$dsep$xmlconfig.dtd"> <websphere-sa-config> <node name="mynode" action="locate"> <application-server name="Default Server" action="export"> </application-server> </node> </websphere-sa-config> The next example is of an XML file you would create to export a single Web application from the same Application Server on the same node: <?xml version="1.0"?> <!DOCTYPE websphere-sa-config SYSTEM "$server_root$$dsep$bin$dsep$xmlconfig.dtd" > <websphere-sa-config> <node name="mynode" action="locate"> <application-server name="Default Server" action="locate"> <servlet-engine name="Default Servlet Engine" action="locate"> <web-application name="default_app" action="export"> </web-application> </servlet-engine> </application-server> </node> </websphere-sa-config> As an example of how you would do a partial configuration export into an XML file, we can name the second file above (the one that would export a single Web application from the node "mynode") PartialFile.xml, place it in the appserver/bin directory, and run the following command from that directory: XMLConfig -export NewExport.xml -adminNodeName mynode -partial PartialFile.xml An XML file named NewExport.xml will then be created in the appserver/bin directory with the following output: <?xml version="1.0"?> <!DOCTYPE websphere-sa-config SYSTEM "$XMLConfigDTDLocation$$dsep$xmlconfig.dtd" > <websphere-sa-config> <node name="mynode" action="locate"> <application-server name="Default Server" action="locate"> <servlet-engine name="Default Servlet Engine" action="locate"> <web-application name="default_app" action="update"> <description>Default Application</description> <document-root>d:\IBM HTTP Server\htdocs</document-root> <classpath> <path value="d:\WebSphere\AppServer\hosts\default_host\default_app\servlets"/> <path value="d:\WebSphere\AppServer\servlets"/> </classpath> <error-page>/ErrorReporter</error-page> <session-config> <session-timeout>0</session-timeout> </session-config> <welcome-file-list/> <filter-list/> <group-attributes/> <auto-reload>true</auto-reload> <reload-interval>9</reload-interval> <enabled>true</enabled> <root-uri>default_host/</root-uri> <shared-context>false</shared-context> <shared-context-jndi-name>SrdSrvltCtxHome</shared-context-jndi-name> <servlet name="snoop" action="update"> <description>Snoop servlet</description> <code>SnoopServlet</code> <init-parameters> <parameter name="param1" value="test-value1"/> </init-parameters> <load-at-startup>false</load-at-startup> <debug-mode>false</debug-mode> <uri-paths> <uri value="/servlet/snoop/*"/> <uri value="/servlet/snoop2/*"/> </uri-paths> <enabled>true</enabled> </servlet> <servlet name="hello" action="update"> <description>Simple Hello servlet</description> <code>HelloWorldServlet</code> <init-parameters/> <load-at-startup>false</load-at-startup> <debug-mode>false</debug-mode> <uri-paths> <uri value="/servlet/hello"/> </uri-paths> <enabled>true</enabled> </servlet> <servlet name="ErrorReporter" action="update"> <description>Default error reporter servlet</description> <code>com.ibm.servlet.engine.webapp.DefaultErrorReporter</code> <init-parameters/> <load-at-startup>true</load-at-startup> <debug-mode>false</debug-mode> <uri-paths> <uri value="/ErrorReporter"/> </uri-paths> <enabled>true</enabled> </servlet> <servlet name="invoker" action="update"> <description>Enables Serving Servlets By Classname</description> <code>com.ibm.servlet.engine.webapp.InvokerServlet</code> <init-parameters/> <load-at-startup>true</load-at-startup> <debug-mode>false</debug-mode> <uri-paths> <uri value="/servlet/*"/> </uri-paths> <enabled>true</enabled> </servlet> <servlet name="jsp10" action="update"> <description>JSP 1.0 support servlet</description> <code>com.sun.jsp.runtime.JspServlet</code> <init-parameters/> <load-at-startup>true</load-at-startup> <debug-mode>false</debug-mode> <uri-paths> <uri value="*.jsp"/> <uri value="*.jsv"/> <uri value="*.jsw"/> </uri-paths> <enabled>true</enabled> </servlet> </web-application> </servlet-engine> </application-server> </node> </websphere-sa-config> |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|