9 Replies Latest reply on Feb 27, 2008 10:30 AM by dsulliva

    Default Pages On Reboot

    dsulliva

      When installing JBOSS Portal and running for the first time a set of Default Pages/Tabs are loaded up on jboss startup.

      Test
      TestWithAjax

      if loading with wiki/forums portlets
      forums
      wiki

      I may have missed one, but anyway the question is when you log into the portal as admin and delete these pages, then reboot the box these pages will reappear.

      Is there something simple that can be done to prevent this from happening? Thought someone could answer this quickly for me.

      My apologies if this is mentioned in the user/reference guides. I'll look there next.

        • 1. Re: Default Pages On Reboot
          peterj

          The layout of the portal is defined in various *-object.xml files. When you initially start the portal, these *-object.xml files are read and their contents placed into the database. If you use the Management Portlet to remove these pages/portlets, then when you restart the *-objects.xml files are re-read again and cause them to reappear. The best thing to do is modify the various *-object.xml files to contain the layout as you want it.

          At some point my presentation on this topic will appear on the JBossWorld web site at http://www.jbossworld.com/downloads/presentations/ (it was on Friday)

          • 2. Re: Default Pages On Reboot
            dsulliva

            I understand what you are saying.

            Is this the only way to do this. For instance playing with the forums portlet.

            If I make the parent-ref empty (ie. <parent-ref></parent-ref> )

            then the forums tab/page does not show up and the forums portlet instance is not an available portlet when modifying page content

            Is there a way to change *-object.xml to prevent it from being configured initially and still have the portlet instance show up as being available and then have the portlet management configure where to put the portlet instance?

            Just seems to me like all portlet instances would be loaded in without being pre-defined by *-object.xml. I guess I may be missing something.

            Please inform.

            Thanks

            • 3. Re: Default Pages On Reboot
              peterj

              Using any portlet as an example, you could do this.

              Do not have any *-object.xml file. You do not even need a portlet-instances.xml file. Without these two, you need to go into the Management Portlet and manually create the portlet instance and then create the portal/page, and finally add the portlet object to the page (this causes the portlet instance to show on the page). This is all described in the JBoss Portal documentation.

              This mechanism works well if you plan to set up the final (production) portal by hand, but does not work well if you want to set up a test or development portal on one machine and then later deploy to a production machine.

              • 4. Re: Default Pages On Reboot
                dsulliva

                Cool, I'll have to play with this.

                Now, on your last point
                >>
                This mechanism works well if you plan to set up the final (production) portal by hand, but does not work well if you want to set up a test or development portal on one machine and then later deploy to a production machine.
                >>

                Why does this matter, isn't the page/portlet instance construction saved within the database?

                If it is saved within the database then I don't see why deploying to production would be a big deal as long as you deploy both the database and application components together. Maybe you can shed some more light here, since I will be doing this down the road.

                Anyway thanks for your quick responses.

                • 5. Re: Default Pages On Reboot
                  peterj

                  Yes, if you are using the same database for development and production, you could just copy the database contents, provided that you have not, during development or testing, put a lot of things into the database that you don't want in production. As an example, I placed a lot of things into CMS to test out various directory structures, and some of those artifacts ended up with multiple revisions. But in production I wanted just the last directory structure and last version of only some of the artifacts. For this it was easier to start with a clean database with my desired CMS content as the default content. I spent a lot of time in development reinitializing everything, including the database, that I wrote an ant script to do it for me. Thus my latest portal layout was always in *-object.xml files. And it was easy to place the portal under version control as it was being developed.

                  • 6. Re: Default Pages On Reboot
                    dsulliva

                    Cool, that's what I wanted to hear and what you say make sense to me.

                    Thanks for your help. :-)

                    • 7. Re: Default Pages On Reboot
                      dsulliva

                      Hi Peter,

                      From your earlier post, you mentioned to not include the *-object.xml or portlet-instances.xml file.

                      I just tried this with the jboss-forums.ear...by removing them from the portal-forums.war file. The problem is that when I do this I do not see the portlet instance available within the Management Portlet.

                      I'll take a look at the JBoss Portal documentation to see what I'm missing.

                      • 8. Re: Default Pages On Reboot
                        dsulliva

                        Ok, I think I see the problem. The default portlet.xml and portlet-instances.xml files in the portal-forums.war file do not seem to match up with what's in the JBoss Portal Reference guide from section 9.3.3.6. I'll take a stab at modifying them accordingly and see what happens.

                        • 9. Re: Default Pages On Reboot
                          dsulliva

                          Disregard my last post, just reading the documentation wrong.

                          You are correct in the fact that I don't need to have to *-object.xml and portlet-instances.xml as the documentation mentions if you want to create the page layouts and portlet instances with the Manage Portlet capability.

                          I was making a bonehead mistake by repackaging the .ear and .war with the name of the files as a top level directory, which wasn't right. And was causing the application.xml file not to be found.

                          All good now. Thanks again for you help.