[EMAIL PROTECTED] wrote:
Hi,

I'm running around in circles here and cannot think of an elegant solution.
I hope someone can help.

Situation:

my project is all in a subdirectory with subsitemap of /cocoon under Tomcat.
In fact I renamed /cocoon to /ROOT so my project's homepage is under

This makes http://localhost:8080/ link to Cocoon, right?

http://localhost:8080/myproject/.

I cannot use relative urls to the various pages, since I have a menubar on
each page, and I also don't want to include the full directorypath
(including the projectname). So I added a baseurl tag to the html-output.


I think you need to use a HostMatcher or a HostSelector.

Recently I made an installation with several subdirectories that are served as virtual hosts. So I have:
http://cocoon:8080/ served from /opt/VirtHosts/cocoon
http://virthost1:8080/ /opt/VirtHosts/virthost1
http://virthost2:8080/ /opt/VirtHosts/virthost2
http://virthost3:8080/ /opt/VirtHosts/virthost3


First part of this configuration is described in: <http://wiki.apache.org/cocoon/Cocoon2_2e1_2e4EasyInstallation>.

In sitemap.xmap of /opt/cocoon, I have put the HostMatcher

<map:match pattern="*:**" type="host">
<map:mount check-reload="yes" src="/opt/VirtHosts/{1}/"


                uri-prefix=""/>
   </map:match>
   <map:match pattern="*" type="host">
     <map:mount check-reload="yes" src="/opt/VirtHosts/{1}/"
                uri-prefix=""/>
   </map:match>

directly at the very beginning of the main <map:pipeline>. This matcher should be defined in the components section before.

   <map:matchers default="wildcard">
   ...
     <map:matcher logger="sitemap.matcher.host" name="host"
       src="org.apache.cocoon.matching.WildcardHostMatcher"/>
   ...
   </map:matchers>

Maybe you can use this example to find a solution for your own configuration. Although mine is Linux, it should work with Windows as well.

--
Volkmar W. Pogatzki


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to