1 Reply Latest reply on Mar 3, 2009 10:40 AM by piergiorgiolucidi

    unable to see java portlet instence

    akumarkind

      Hi All
      I am using Eclipse3.4.1 and jboss tools 2.1.2GA for portlet development.
      I am creating dynamic web project and after that adding java core portlet.
      First I am running first portlet it instence is created and showing in the portlet instance list but after creating second portlet in the same project, first portlet instance is not showing in the portlet instance list only econd instance is showing.Please help me.

      With Regards
      Avanish Kumar

        • 1. Re: unable to see java portlet instence
          piergiorgiolucidi

          I think it could be depend on settings on your portlet-instances.xml file.
          If you have declared "if-exists" tag for this portlet in your portlet-instances.xml in this way:

          <if-exists>overwrite</if-exists>
          <instance>
           <instance-id>YourPortletInstance</instance-id>
           <portlet-ref>yourApp.yourPortlet</portlet-ref>
          </instance>
          

          You are telling the container to destroy any existing object and create a new one.

          If would you like the container retains any existing copy and creates a new instance, then you must set "keep" as value of this tag, in this way:
          <if-exists>keep</if-exists>
          <instance>
           <instance-id>YourPortletInstance</instance-id>
           <portlet-ref>yourApp.yourPortlet</portlet-ref>
          </instance>
          

          Try this ;)

          Hope this helps