Version 12

    The CMS Portlet - Demystified.


    The CMS Portlet handles content serving from a respository store. Currently, it uses a WebDAV server to store, retrieve, and version, all of it's content using Jakarta Slide. Other configurable storing methods will be added with subsequent versions.


    By default, we ship the webdav server with auto-versioning enabled. To change this setting, you will need to unpack the slide.war, that is inside the nukes-core.sar, modify the Domains.xml files and set this field to false:

    <parameter name='auto-version-control'>false</parameter>


    Initial Connect


    The first time you connect to (http://localhost:8080/nukes) the standard JBoss Portal install, you will notice a few lines in your server.log:


    13:51:43,736 INFO  [STDOUT] Connecting to WebDAV server
    13:51:43,806 INFO  [STDOUT] http-, 15-Dec-2004 13:51:43, root, PROPFIND, 207 'Multi-Status', 60 ms, /files
    13:51:43,826 INFO  [STDOUT] SUCCESSFULLY connected to WebDAV server
    13:51:43,976 INFO  [STDOUT] http-, 15-Dec-2004 13:51:43, root, PROPFIND, 404 'Not Found', 140 ms, /files/index.html
    13:51:44,337 INFO  [STDOUT] http-, 15-Dec-2004 13:51:44, root, MKCOL, 201 'Created', 331 ms, /files/images
    13:51:44,597 INFO  [STDOUT] http-, 15-Dec-2004 13:51:44, root, MKCOL, 201 'Created', 250 ms, /files/support
    13:51:44,857 INFO  [STDOUT] http-, 15-Dec-2004 13:51:44, root, MKCOL, 201 'Created', 240 ms, /files/errorpages
    13:51:45,859 INFO  [STDOUT] http-, 15-Dec-2004 13:51:44, root, PUT, 201 'Created', 952 ms, /files/index.html
    13:51:46,590 INFO  [STDOUT] http-, 15-Dec-2004 13:51:45, root, PUT, 201 'Created', 701 ms, /files/support/index.html
    13:51:48,232 INFO  [STDOUT] http-, 15-Dec-2004 13:51:46, root, PUT, 201 'Created', 1632 ms, /files/errorpages/404.html
    13:51:49,434 INFO  [STDOUT] http-, 15-Dec-2004 13:51:48, root, PUT, 201 'Created', 1182 ms, /files/images/jbportal_logo.gif
    13:51:50,195 INFO  [STDOUT] http-, 15-Dec-2004 13:51:49, root, PUT, 201 'Created', 741 ms, /files/images/bookmark.gif
    13:51:50,756 INFO  [STDOUT] http-, 15-Dec-2004 13:51:50, root, PUT, 201 'Created', 551 ms, /files/images/back.gif


    The lines above, on initial connect, are creating the default data for the store. By default we create index pages, images they link to, and subdirectories certain content resides in.


    You should now see the index page in your browser with embedded images, inside the cms portlet.


    Browsing the Store


    Currently, there is no way to browse the content store thru an admin interface. This will be added in the coming Alpha Release with this task.


    By default, the store should appear on your filesystem under JBOSS_HOME/bin/store and JBOSS_HOME/bin/work. To browse/add/edit/delete content in the interim, I suggest you download and install DAV Explorer. To use DAVExplorer, connect to your store at http://localhost:8080/slide/. Enter in the default username and password: root/root. All of the default content created by the cmsportlet should be under /files.


    Remember: /files is the root of your content. No content that you want the cmsportlet to show can be placed anywhere above this directory!


    Now lets look at the directory structure with DAVExplorer or navigating to JBOSS_HOME/bin/store/content/files/

    You should see the following:


    Errorpages: All custom errorpages the cmsportlet uses are placed here. More will be added, but for now, we have a standard '404.html' page we use to display when a resource is not found. Navigate now to http://localhost:8080/nukes/files/foobar.html and you should see it.


    Images: Images used for our default homepage.


    Support: Support page that links to our support offerings, in case you have an issue with the portal.


    index.html: Our default homepage. This Page Must Exists - Do Not Remove it!


    Analyzing a Page


    Assuming you are currently using DAV Explorer to write or overwrite content. Please keep in mind that when linking to images or other pages within your store that the root path is /files. For instance, if you look at the source of our /files/index.html page, you will note the following link to our logo:



    This assumes the file is sitting in /files and the image is one directory below it in /files/images/jbportal_logo.gif.


    Now, if you look at the resulting page source in your browser, you will notice a change in the img src to this:



    To contain page linking, serve binaries, and other reasons, we saw fit to have to parse all links. This should not have any effect on your existing or new html pages, but is mentioned here so you keep this in mind, in case you encounter broken links or images. In fact, you should be able to simply drop in your current website and it should work seemlessly without having to modify any links to pages or images.


    Store Security

    Store security is handled by JAAS. There are a files you need to know about and modify to secure your store before it is production-ready. These are:

    slide.war/WEB-INF/web.xml - this contains your role listing. You can leave this alone.
    slide.war/WEB-INF/jboss-web.xml - this contains jaas domain information. You can leave this alone.
    slide.war/WEB-INF/classes/ - this contains role information, and should probably be left alone, as they map to roles inside the slide.war/WEB-INF/web.xml 
    slide.war/WEB-INF/classes/ - this one you need to change!


    Changing the root password

    JBoss Portal uses the root role and root user to connect to the store. Changing the password in the will not allow the portal to connect! So, if you changed it in the properties file, it needs to be changed inside the portal, now lets get to it:


    The password you changed for the root user, now needs to be changed in two different places:


    1. The CoreServlet config in nukes-core.sar/nukes-core.war/WEB-INF/web.xml


    Look for 'WebDAV server password' under the 'PortletServlet' config. Change the value for the password there.


    2. The CMSPortlet config in nukes-core.sar/nukes-core.war/WEB-INF/portlet.xml


    Look for the 'WebDAV server password' under the 'CMSPortlet' config. Change the value for the password there.