This content has been marked as final.
Show 1 reply
-
1. Re: How to deploy 2 portlets in the same WAR
habicht Aug 29, 2007 2:29 AM (in response to jado)i guess you mean the file portlet.xml. here is an example that i use
<?xml version="1.0" encoding="UTF-8"?> <portlet-app id="PortletA" version="1.0"> <portlet id="PortletA"> <portlet-name>portleta</portlet-name> <display-name>portleta</display-name> <portlet-class>test.PortletA</portlet-class> <expiration-cache>0</expiration-cache> <supports> <mime-type>text/html</mime-type> <portlet-mode>VIEW</portlet-mode> </supports> <portlet-info> <short-title>Portlet A</short-title> <keywords>Portlet</keywords> </portlet-info> </portlet> </portlet-app>
so the file for 2 portlets should look something like that<?xml version="1.0" encoding="UTF-8"?> <portlet-app id="Portlets" version="1.0"> <portlet id="PortletA"> <portlet-name>portleta</portlet-name> <display-name>portleta</display-name> <portlet-class>test.PortletA</portlet-class> <expiration-cache>0</expiration-cache> <supports> <mime-type>text/html</mime-type> <portlet-mode>VIEW</portlet-mode> </supports> <portlet-info> <short-title>Portlet A</short-title> <keywords>Portlet</keywords> </portlet-info> </portlet> <portlet id="PortletB"> <portlet-name>portletb</portlet-name> <display-name>portletb</display-name> <portlet-class>test.PortletB</portlet-class> <expiration-cache>0</expiration-cache> <supports> <mime-type>text/html</mime-type> <portlet-mode>VIEW</portlet-mode> </supports> <portlet-info> <short-title>Portlet B</short-title> <keywords>Portlet</keywords> </portlet-info> </portlet> </portlet-app>
as for the portlet-instances.xml i'm not sure what the file should look like.
hope this can help you
greetings habicht