Topic
  • 7 replies
  • Latest Post - ‏2013-01-04T16:24:38Z by kevintap
SystemAdmin
SystemAdmin
9029 Posts

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
    2561 Posts

    Re: portlet.xml missing portlet meta data

    ‏2013-01-03T15:40:19Z  
    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

    Re: portlet.xml missing portlet meta data

    ‏2013-01-03T15:55:24Z  
    • mburati
    • ‏2013-01-03T15:40:19Z
    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.
    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

    Re: portlet.xml missing portlet meta data

    ‏2013-01-03T16:24:33Z  
    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.
    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
    2561 Posts

    Re: portlet.xml missing portlet meta data

    ‏2013-01-03T16:29:53Z  
    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.
    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
    747 Posts

    Re: portlet.xml missing portlet meta data

    ‏2013-01-03T16:31:46Z  
    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.
    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

    Re: portlet.xml missing portlet meta data

    ‏2013-01-03T18:16:30Z  
    • kevintap
    • ‏2013-01-03T16:31:46Z
    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.
    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
    747 Posts

    Re: portlet.xml missing portlet meta data

    ‏2013-01-04T16:24:38Z  
    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
    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.