Portal Paths

This file is meant to be a starting point for people who want to move the sample portal (as from cocoon 2.1.8.) to another location. I hope that this document will grow, so it can be of use to as many users as possible.

What I did: I built and deployed cocoon 2.1.8. into my Tomcat webapps directory. The path that contains the build is directory-where-my-tomcat-is/webapps/copo/ (i.e. cocoon portal). In this folder you'll find a few other folders, namely

What I did then was move the folder portal/ from copo/samples/blocks/ to copo/. This meant that I had to change some paths inside the configuration files, the most important one being the cocoon.xconf. This file is located in the folder WEB-INF/ inside copo/. The first thing you need to change is the uri-prefix inside the projectpath-configuration. The uri-prefix, in my case, is set in line 251. The code should look like this:

<component-instance class="org.apache.cocoon.components.modules.input.ProjectPathModule" logger="core.modules.input" name="portalpath">

Note that the path is relative to the build-path of your cocoon-build. Change the samples/blocks/portal/ to the path where your portal-folder is inside your cocoon-build-path (in my case copo/). In my case this is of course portal/: <uri-prefix>portal/</uri-prefix>

Secondly you want to change the skin base-path of your cocoon portal. This is also done in cocoon.xconf, somewhere around line 1666. I removed the samples/blocks/ from the following lines of code

        <skin base-path="context://samples/blocks/portal/skins/basic" name="basic">
        <skin base-path="context://samples/blocks/portal/skins/common" name="common">

Basically the same needs to be done to the file sitemap.xmap inside the portal/-folder. Somewhere near line 145 the paths to where to save the profiles are set. It should look something like

<map:match pattern="save-user-profile">
  <map:generate src="resources/save-user-profile.xml"/>
        <map:transform src="styles/save-user-profile.xsl">
              <map:parameter name="profiles" value="context://samples/blocks/portal/profiles/"/>
        <map:transform type="session"/>
        <map:transform type="write-source"/>
        <map:serialize type="xml"/>

Also here, I changed the value of attribute value inside <map:parameter/> to the correct path, being portal/profiles/.

Basically, that's it. Good luck.


PortalPaths (last edited 2009-09-20 23:43:09 by localhost)