[jboss-user] [JBoss Portal] - Re: How to deploy 2 portlets in the same WAR

habicht do-not-reply at jboss.com
Wed Aug 29 02:29:58 EDT 2007


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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079005#4079005

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079005



More information about the jboss-user mailing list