[jboss-user] [JBoss Portal] - Need some hello world portlet help...

Jboss_ton do-not-reply at jboss.com
Fri Nov 23 10:18:41 EST 2007


Sorry for the newbie question, but I've spent hours trying to find the answer (and experimenting) and I just cannot get something simple to work. If this is documented somewhere, please point me in the right direction, but I couldn't find it...

I installed the basic 2.6.2 GA Portal (with AS) to play around. Got it running fine, could deploy several sample portlets without a problem. Imported one of the samples (just hello world html string) in my Eclipse installation to try and compile it myself and make some changes (just modified the string) - deployed as new war file - worked.

Now I'm trying to deploy two basic (just hello world string html) portlets of my own in one war file, and I'm not able to get instances of these portlets automatically created. I can see the portlets on the portlet definitions tab, but I don't see instances under the instances tab. The strange thing to me is, when I manually try to create an instance using one of the instance ids I defined in portlet-instances, I get an error "An instance with the id MySecondInstance already exist!" - even though it does not show up on the instances tab... When I use a different id, I can create instances and add them to windows without a problem, so something must be wrong with my portlet-instances.xml or -object.xml files, right?

I tried several names for my war file (I thought it had to match the first part of -object.xml, so I tried MyPortlet.war as well).

I do not see any error messages from JBoss...

-----MyPortlet-object.xml--------
<?xml version="1.0" encoding="UTF-8"?>
  | <!DOCTYPE deployments PUBLIC
  | "-//JBoss Portal//DTD Portal Object 2.6//EN"
  | "http://www.jboss.org/portal/dtd/portal-object_2_6.dtd">
  | 	<deployments>
  | 		<deployment>
  | 			<parent-ref>default.default</parent-ref>
  | 			<if-exists>overwrite</if-exists>
  | 			<window>
  | 				<window-name>HelloWorldPortletWindow</window-name>
  | 				<instance-ref>MyFirst</instance-ref>
  | 				<region>center</region>
  | 				<height>1</height>
  | 			</window>
  | 		</deployment>
  | 		<deployment>
  | 			<parent-ref>default.default</parent-ref>
  | 			<if-exists>overwrite</if-exists>
  | 			<window>
  | 				<window-name>MySecondPortletWindow</window-name>
  | 				<instance-ref>MySecondInstance</instance-ref>
  | 				<region>center</region>
  | 				<height>1</height>
  | 			</window>
  | 		</deployment>
  | 	</deployments>
  | 

------portlet-instances.xml------

  | <?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>
  | 		<deployment>
  | 			<instance>
  | 				<instance-id>MyFirst</instance-id>
  | 				<portlet-ref>MyPortlet</portlet-ref>
  | 			</instance>
  | 		</deployment>
  | 		<deployment>
  | 			<instance>
  | 				<instance-id>MySecondInstance</instance-id>
  | 				<portlet-ref>MySecondPortlet</portlet-ref>
  | 			</instance>
  | 		</deployment>		
  | 	</deployments>
  | 


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

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



More information about the jboss-user mailing list