我需要更新WebSphere Portal 6.0上的portlet。我試圖使用xmlaccess.bat。這裏是我的DeployPortlet.xml:WebSphere Portal:更新/刪除戰爭
<?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">
<!-- The uid must match uid attribute of portlet-app in portlet.xml. -->
<web-app action="update" active="true" uid="com.firstlinesoftware.oo.portlet.TestPortlet
<url>file:///$server_root$/installableApps/TestPortlet.war</url>
<!-- The uid must match uid attribute of concrete-portlet-app in portlet.xml. -->
<portlet-app action="update" active="true" uid="TestPortlet">
<!-- The name attribute must match content of portlet-name subtag of concrete-portlet in portlet.xml. -->
<portlet action="update" active="true" objectid="theIbmPortletApiPortlet" name="TestPortlet"/>
</portlet-app>
</web-app>
<!-- Parent element under which the new page is inserted -->
<content-node action="locate" objectid="parentPage" uniquename="ibm.portal.rational.portlets"/>
<!-- The new page.
The contentparentref attribute must match the objectid of the parent.
Change the uniquename attribute to create another page. -->
<content-node action="update" uniquename="ibm.portal.TestPortletPage" ordinal="last" content-parentref="parentPage" active="true" allportletsallowed="false" create-type="explicit" type="page">
<supported-markup markup="html" update="set"/>
<localedata locale="en"><title>TestPortletPage</title></localedata>
<component action="update" ordinal="100" type="container" orientation="H">
<component action="update" ordinal="100" type="control">
<!-- The portletref must match the objectid attribute of the portlet -->
<portletinstance action="update" portletref="theIbmPortletApiPortlet"/>
</component>
</component>
</content-node>
</portal>
當我使用這個劇本,第一次一切正常。但是,當我嘗試使用此腳本更新Portlet時(無論何處action="update"
),都會發生異常:DuplicateAppException。
然後我試圖通過腳本刪除此portlet:
<?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">
<!-- sample for uninstalling a web module -->
<portal action="locate">
<!-- uid must match uid attribute of portlet-app in portlet.xml -->
<web-app action="delete" active="true" uid="TestPortlet">
</web-app>
</portal>
</request>
但警告occure:不能刪除的portlet(有沒有這樣的一個網絡模塊)也許是前面刪除。其實這個戰爭文件是部署(檢查這與管理控制檯)
任何人都可以,請幫助我嗎?