Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
7 replies Latest Post - ‏2013-01-04T16:24:38Z by kevintap
SystemAdmin
SystemAdmin
9029 Posts
ACCEPTED ANSWER

Pinned topic portlet.xml missing portlet meta data

‏2013-01-03T15:33:13Z |
Our auto generated portlet.xml does not contain portlet metadata despite the fact that we have portlet adapter builder.
Read some forum entries and tried Deleting the ExternalModelProperties.xml under "\WebContent\WEB-INF\models" and regenerating the model and regenerating the model but still not seeing the portlet meta data in our portlet.xml

We are using Web Experience Factory at level 7.0.1.4.

How can get the portlet.xml generated correctly ?
Updated on 2013-01-04T16:24:38Z at 2013-01-04T16:24:38Z by kevintap
  • mburati
    mburati
    2552 Posts
    ACCEPTED ANSWER

    Re: portlet.xml missing portlet meta data

    ‏2013-01-03T15:40:19Z  in response to SystemAdmin
    Are you generating the portlet WAR from the Designer or from a command line script via ant? If the latter, then be sure to use the WEF supplied ant tasks for generating the portlet WAR.

    Also, if you're using source control with this project it's typically recommended to not check in ExternalModelProperties.xml so that it's generated from the checked in models and doesn't become out of synch with updates to those models.

    I hope that info helps,
    ..Mike Burati
    http://www-10.lotus.com/ldd/pfwiki.nsf/
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
    • SystemAdmin
      SystemAdmin
      9029 Posts
      ACCEPTED ANSWER

      Re: portlet.xml missing portlet meta data

      ‏2013-01-03T15:55:24Z  in response to mburati
      We are generating the portlet WAR ( using the publish WAR option ) from the Designer. No Command Line or ANT script involved. We are not using any source control yet.

      It's pretty much a simple WEF Project, Main & Page type model and a Portlet Adapter.

      Not really sure if I am missing any steps (besides adding a Portlet Adapter) to convert my model into a portlet and more importantly getting the portlet meta data in the portlet.xml

      Any help in this matter would really be appreciated.
      • SystemAdmin
        SystemAdmin
        9029 Posts
        ACCEPTED ANSWER

        Re: portlet.xml missing portlet meta data

        ‏2013-01-03T16:24:33Z  in response to SystemAdmin
        I Edited the Server Configurations in WEF; Changed the "Create Test Page" option from "none" to "Single
        Page" and it published the application. Now I am seeing my portlet.xml being populated with the portlet meta-data.

        Not really sure what the co relation was but it started working.
        • mburati
          mburati
          2552 Posts
          ACCEPTED ANSWER

          Re: portlet.xml missing portlet meta data

          ‏2013-01-03T16:29:53Z  in response to SystemAdmin
          It shouldn't have needed the portal test page in order to generate the portlet.xml correctly - it may have just been a timing coincidence that it started working then.

          In general, if you add a Portlet Adapter, click OK in the buidler, save the model and then deploy the project/portlet WAR, it should generate portlet.xml correctly. If you forget to OK in the Portlet Adapter or forget to save the model after that, then the external model property won't be set yet so the task that generates portlet.xml won't know it's enabled as a portlet yet (I have done that myself in the past).

          I hope that info helps,
          ..Mike Burati
          http://www-10.lotus.com/ldd/pfwiki.nsf/
          The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
        • kevintap
          kevintap
          746 Posts
          ACCEPTED ANSWER

          Re: portlet.xml missing portlet meta data

          ‏2013-01-03T16:31:46Z  in response to SystemAdmin
          In reading through the description of your problem here, it occurs to me that you may not be aware that you must re-publish your project to the server in order for the portlet.xml file to be re-generated. If you have not re-published your project, that step is required. Simply adding the Portlet Adapter builder to the model does not cause portlet.xml to be re-generated.
          • SystemAdmin
            SystemAdmin
            9029 Posts
            ACCEPTED ANSWER

            Re: portlet.xml missing portlet meta data

            ‏2013-01-03T18:16:30Z  in response to kevintap
            Mike / Kevin,

            The key step missed was "re-publishing" the WAR. I assumed that just adding the Portlet Adapter would update the portlet.xml but it seems its only when you explicitly perform "publish application" after add the Portlet Adapter; the WEF updates the portlet.xml.

            Thanks a lot for your quick responses,
            Regards,
            Mehul Mehta
            • kevintap
              kevintap
              746 Posts
              ACCEPTED ANSWER

              Re: portlet.xml missing portlet meta data

              ‏2013-01-04T16:24:38Z  in response to SystemAdmin
              It is worth mentioning that the requirement to re-publish is driven by WebSphere AppServer/WebSphere Portal. WebSphere will only accept updates to portlet.xml (or any other descriptor file such as web.xml for that matter) if the WAR/EAR is explicitly updated through an update action or uninstall/install action in WebSphere.