-
1. Re: Portal deployment alternatives
jlaskowski Sep 24, 2005 5:21 PM (in response to 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
julien1 Sep 24, 2005 7:48 PM (in response to jlaskowski)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.