2 Replies Latest reply on Sep 24, 2005 7:48 PM by julien1

    Portal deployment alternatives

    jlaskowski

      Hi,

      I can't figure out what deployment options are available in JBoss Portal. I work with the sources, so its version is JBoss Portal 2.2.0-ALPHA and JBoss AS is 4.0.3RC2.

      According to the chapter 2 of JBoss Portal reference guide - http://docs.jboss.com/jbportal/v2.0Final/reference-guide/en/html/xmldescriptors.html#d0e557 it should be possible to deploy *-portal.xml files without having them to be bundled in a war. I can't get this to work, thought - /portal/myportal keeps showing me the default portal. Am I missing something? Is there a way to list all of the deployed portals?

      BTW: I have really been amazed by the new layout scheme - phalanx. It's a nice-looking layout.

      Jacek

        • 1. Re: Portal deployment alternatives
          jlaskowski

          Hi,

          After a couple of days exploring the code, I finally figured out how to deploy a portlet and a portal separately and be able to access it. I must admit it was a quite challenging task.

          I don't know if *-portal.xml files can be deployed as-is in deploy directory, but the trick is to set up your development environment to create a war file with WEB-INF/*-portal.xml file in it. Another wars file contain your portlets, one per a web app, so that portals and portlets are kept separately.

          It's easily done with NetBeans 5.0 (with its JBoss support), probably not less easy with Apache Maven and some other tools.

          The latest version of JBoss Portlet 2.2.0-ALPHA (built from cvs) has changed the way portals and portlets are accessed. Now, the path to a portal is of the pattern: /[local|global]/<portal-name>/<page-name>/<window-name>/<instance-ref>. You can find the urls taking a look at server.log (where DEBUGs go) and look up 'portalobject'. Remove it and you'll get the url. So, /portalobject/A/B/C/D gives A/B/C/D and represents the portal A with the page B that in turn references the window C and its portlet D.

          The last question is what the difference between local and global is. Probably, it pertains to how the session is kept - locally or distributed, but I don't know it yet. Could anyone explain it to me?

          There're some additional query params: ctrl|render|nav|move|page and cmd, which can influence what is really executed and how, but had no time to delve into it. Could anyone explain it to me, too?

          Jacek

          • 2. Re: Portal deployment alternatives

            Hello Jacek,

            local means that the portal comes from a deployment made from a war file
            global means that the portal is stored in the database

            The current code that maps a URL to a portal object is located in the CommandMapper which maps a URL to a command.

            URLs like /a/b/c are called friendly URLs and there is a mapper which maps such URLs to the RenderPageCommand which the page name equals to the path of the page coming from the url.

            It is prefixed by local or global in order to differenciate the space in which the object live.

            URLs like index.html&.... are called canonical and can carry more informations and are used for complex commands that needs lot of parameters like invoking a process action and such. For understand these commands you should like at or the CanonicalCommandMapper which performs that task.

            Note that anyone is capable to implement its command mapper and you shold be capable to use it.