Importation d'une page statique au format binaire

Vous pouvez importer une page de contenu statique dans un format de contenu binaire à l'aide de l'interface de configuration XML.

Vous pouvez adapter l'exemple suivant et l'utiliser pour importer une page statique. Cet exemple illustre les possibilités supplémentaires suivantes :
  • Il suppose que le portlet est déjà installé. Par conséquent, il utilise uniquement une action locate pour le module Web et non pas une action update.
  • Il présente comment vous pouvez spécifier le contenu d'une page statique au format binaire. Pour obtenir le contenu au format binaire, exportez la page à l'aide de l'interface de configuration XML.
  • Vous pouvez ensuite exporter le résultat pour générer un modèle pour vos scripts XML.
Exemple de fichier : CreateStaticPage.xml
<?xml version="1.0" encoding="UTF-8"?>
<request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" update="true"
    xsi:noNamespaceSchemaLocation="PortalConfig_8.5.0.xsd" create-oids="true">   
   <portal action="locate">       
        <web-app action="locate" uid="ilwwcm-localrenderingportlet-jsr.war.webmod">
           <portlet-app action="locate" uid="ilwwcm-localrenderingportlet-jsr.war">
                <portlet action="locate" objectid="theExamplePortlet" name="Web Content Viewer (JSR 286)">
                </portlet>
            </portlet-app>
        </web-app>

        <content-node action="locate" objectid="parentPage" uniquename="ibm.portal.Home"/>
        <content-node action="update" active="true" allportletsallowed="true" content-parentref="parentPage" 
                      create-type="explicit" domain="rel" ordinal="last" type="staticpage" 
                      uniquename="ibm.portal.ssa.SamplePage.2">      
            <localedata locale="en" prefix="page.sample">
               <title>Sample Page 1</title>
            </localedata>

            <pagecontents markup="html" display-option="inline">
                <content>UEsDBBQACAAIALKbTDcAAAAAAAAAAAAAAAALAAAAaW5kZXgxLmh0bWxtUE1rwzAMvQf6H0TuTeh1
                         ZL7stFsghZ5VW2sEjmxir1n//YTdbDAGOoj3IelpmAmdOTRD5uzJTLhETzBlzGxhxBsNfWVU0u/a
                         a3APc9AmmvPMCbQQUvVE9QB9lTkdFLpAMyYIQhDDquPyu6heLMGFvA0LwVjxDurcHX7Khz6WhY7v
                         YD2m9No+maMNkpGF1hYEF/oh3nb81Jr/nRuLC9sf26WAp1bzPPwvfHT0wcKZg7xsMXWx2y88B81w
                         neJMa02BvizsdWO5uTZNiTV6wkRw58QZPvVtNz2xhFNdfWvzDVBLBwjDeEQR4AAAAJMBAABQSwEC
                         FAAUAAgACACym0w3w3hEEeAAAACTAQAACwAAAAAAAAAAAAAAAAAAAAAAaW5kZXgxLmh0bWxQSwUG
                         AAAAAAEAAQA5AAAAGQEAAAAA
                </content>
            </pagecontents>

            <parameter name="com.ibm.portal.bookmarkable" type="string" 
                       update="set"><![CDATA[Yes]]&gt;</parameter>
            <parameter name="com.ibm.portal.friendly.name" type="string" 
                       update="set"><![CDATA[staticpage2]]&gt;</parameter>
            <parameter name="com.ibm.portal.static.page.file.name.html" type="string" 
                       update="set"><![CDATA[index1.html]]&gt;</parameter>
            <access-control externalized="false" owner="uid=wpsadmin,o=defaultwimfilebasedrealm" private="false"/>
            <component action="update" active="true" domain="rel" ordinal="100" orientation="V" type="container">
                <component action="update" active="true" domain="rel" ordinal="100" orientation="V" type="container"/>
                <component action="update" active="true" domain="rel" ordinal="100" orientation="H" type="container">
                    <parameter name="com.ibm.portal.layoutnode.localname" type="string" 
                               update="set"><![CDATA[portletContainer1]]&gt;</parameter>
                    <component action="update" active="true" domain="rel" ordinal="100" type="control">
                        <parameter name="com.ibm.portal.layoutnode.localname" type="string" 
                                   update="set"><![CDATA[portletWindow1]]&gt;</parameter>
                        <portletinstance action="update" domain="rel" portletref="theExamplePortlet" />
                    </component>
                </component>
            </component>
        </content-node>
    </portal>
</request>