[jboss-user] [JBoss Portal] - How do I create instances of external portlets?

afichtner do-not-reply at jboss.com
Tue Dec 4 08:04:48 EST 2007

How can I create instances of portlets that have been defined outside  of my portal's war?  

Specifically, I want to create instances of NewsPortlet (which comes automatically installed with JBoss Portal) and PortletBridge (which has been installed to JBoss's deploy directory through it's own .war).  I'm using JBoss Portal 2.6.2.

When I try defining them in my portlet-instances.xml, I get errors on deployment because JBoss tries to find them underneath of my application (my application's name is "ehealth", which you can see it's appending here).

portlet-instances.xml (in my ehealth.war file):
<?xml version="1.0" standalone="yes"?>
  | <!DOCTYPE deployments PUBLIC
  |    "-//JBoss Portal//DTD Portlet Instances 2.6//EN"
  |    "http://www.jboss.org/portal/dtd/portlet-instances_2_6.dtd">
  | <deployments>
  |    <!-- Create News Portlet instance to load Yahoo News -->
  |    <deployment>
  |       <instance>
  |          <instance-id>YahooNewsPortletInstance</instance-id>
  |          <portlet-ref>NewsPortlet</portlet-ref>
  |       </instance>
  |          <preferences>
  |             <preference>
  |                 <name>RxxXml</name>
  |                 <value>http://rss.news.yahoo.com/rss/topstories</value>
  |             </preference>
  |         </preferences>
  |    </deployment>
  |    <!-- Create Google PortletBridge instance to load Google -->
  |    <deployment>
  |       <instance>
  |          <instance-id>GooglePortletBridgeInstance</instance-id>
  |          <portlet-ref>org.portletbridge.portlet.PortletBridgePortlet</portlet-ref>
  |       </instance>
  |       <preferences>
  |         <preference>
  |           <name>initUrl</name>
  |           <value>http://www.google.com</value>
  |         </preference>
  |       </preferences>
  |    </deployment>
  | </deployments>

Deployment Errors
It can't create either instance because it can't find the portlet under ehealth.* (again, ehealth is my portal's application name):

anonymous wrote : WARN  [PortletAppDeployment] Failed to create instance YahooNewsPortletInstance of portlet ehealth.NewsPortlet because portlet ehealth.NewsPortlet is not available
  | WARN [PortletAppDeployment] Failed to create instance GooglePortletBridgeInstance of portlet ehealth.org.portletbridge.portlet.PortletBridgePortlet because portlet ehealth.org.portletbridge.portlet.PortletBridgePortlet is not available 

Is there a way to tell it to look for the portlet outside  of my portal? (or to just stop appending my application's name onto the front of it?)


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

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

More information about the jboss-user mailing list