JBoss Developer: Message List - Need some hello world portlet help...Most recent forum messageshttps://developer.jboss.org/community/jbossportal?view=discussionsJive Engage2007-11-23T15:18:40Z2007-11-23T15:18:40ZenNeed some hello world portlet help...Ton Vlaming/people/jboss_tondo-not-reply@jboss.com2007-11-23T15:18:40Z2007-11-23T15:18:40Z<!-- [DocumentBodyStart:757f180c-2401-4626-81c0-de90e71f2222] --><div class="jive-rendered-content"><p>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...<br/><br/>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.<br/><br/>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?<br/><br/>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).<br/><br/>I do not see any error messages from JBoss...<br/><br/>-----MyPortlet-object.xml--------<br/></p><!--[CodeBlockStart:d82e17bd-7b81-444f-bd22-4aa70cccdd79][excluded]--><pre class="java" name="code">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE deployments PUBLIC
"-//JBoss Portal//DTD Portal Object 2.6//EN"
"http://www.jboss.org/portal/dtd/portal-object_2_6.dtd"&gt;
&lt;deployments&gt;
&lt;deployment&gt;
&lt;parent-ref&gt;default.default&lt;/parent-ref&gt;
&lt;if-exists&gt;overwrite&lt;/if-exists&gt;
&lt;window&gt;
&lt;window-name&gt;HelloWorldPortletWindow&lt;/window-name&gt;
&lt;instance-ref&gt;MyFirst&lt;/instance-ref&gt;
&lt;region&gt;center&lt;/region&gt;
&lt;height&gt;1&lt;/height&gt;
&lt;/window&gt;
&lt;/deployment&gt;
&lt;deployment&gt;
&lt;parent-ref&gt;default.default&lt;/parent-ref&gt;
&lt;if-exists&gt;overwrite&lt;/if-exists&gt;
&lt;window&gt;
&lt;window-name&gt;MySecondPortletWindow&lt;/window-name&gt;
&lt;instance-ref&gt;MySecondInstance&lt;/instance-ref&gt;
&lt;region&gt;center&lt;/region&gt;
&lt;height&gt;1&lt;/height&gt;
&lt;/window&gt;
&lt;/deployment&gt;
&lt;/deployments&gt;
</pre><!--[CodeBlockEnd:d82e17bd-7b81-444f-bd22-4aa70cccdd79]--><div style="display:none;"></div><br/><br/>------portlet-instances.xml------ <br/><!--[CodeBlockStart:6e214c6f-b55d-4317-8c46-edc669a1b326][excluded]--><pre class="java" name="code">
&lt;?xml version="1.0" standalone="yes"?&gt;
&lt;!DOCTYPE deployments PUBLIC
"-//JBoss Portal//DTD Portlet Instances 2.6//EN"
"http://www.jboss.org/portal/dtd/portlet-instances_2_6.dtd"&gt;
&lt;deployments&gt;
&lt;deployment&gt;
&lt;instance&gt;
&lt;instance-id&gt;MyFirst&lt;/instance-id&gt;
&lt;portlet-ref&gt;MyPortlet&lt;/portlet-ref&gt;
&lt;/instance&gt;
&lt;/deployment&gt;
&lt;deployment&gt;
&lt;instance&gt;
&lt;instance-id&gt;MySecondInstance&lt;/instance-id&gt;
&lt;portlet-ref&gt;MySecondPortlet&lt;/portlet-ref&gt;
&lt;/instance&gt;
&lt;/deployment&gt;
&lt;/deployments&gt;
</pre><!--[CodeBlockEnd:6e214c6f-b55d-4317-8c46-edc669a1b326]--><div style="display:none;"></div><br/><br/><br/></div><!-- [DocumentBodyEnd:757f180c-2401-4626-81c0-de90e71f2222] --><img src='/beacon?t=1513219651849' />2007-11-23T15:18:40Z10 years 3 weeks ago0