RegisterPreDeployedEAR.xml

 

<?xml version="1.0" encoding="UTF-8"?>
<!--
-->

<request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xsi:noNamespaceSchemaLocation="PortalConfig_1.4.xsd" 
         type="update" create-oids="true">

    <portal action="locate">

        <!-- Use the predeployed attribute to indicate that the URL of the Web application is the location in the filesystem 
                to where the EAR file with the contained WAR file has been extracted. -->   

        <web-app action="update" uid="my.test.web-app" active="true" predeployed="true">

            <!-- In this case, the URL points to the root directory of the extracted WAR file in the portal server directory. -->
            <url>file://localhost/D:/WebSphere/deploy_target_directory/installedApps/myapp.ear/myportletapp.war</url>

            <!-- The context root that is assigned to the web application of the portlet application in the 
                 predeployed EAR file (reference: application.xml). must start with a slash -->
            <context-root>/my/context/root</context-root>

            <!-- The name that is assigned to the application in the predeployed EAR file (reference: application.xml). -->
            <display-name>My Web App</display-name>

            <portlet-app action="update" active="true" name="My portlet app" uid="my.test.portlet-app">
                <portlet action="update" active="true" name="My Portlet"/>
            </portlet-app>
        </web-app>

    </portal>
</request>