You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Kevin McDermott <Ke...@realise.com> on 2003/03/14 16:09:30 UTC

HostSelector

I'm running Cocoon 2.0.4 on IBMJDK 1.3.1.

I've got Apache NameVirtualHosting, onto Tomcat 4.1.18, which is mapped to the same Cocoon instance.

My sitemap.xmap has been stripped down and I've entered the following host setup

   <map:selector logger="sitemap.selector.host" name="host" src="org.apache.cocoon.selection.HostSelector"/>
        <host name="poc1" value="poc1.mydomain.com"/>
        <host name="poc2" value="poc2.mydomain.com"/>
  </map:selectors>

In my Main Pipeline, I've got 

    <map:select type="host">
        <map:when test="poc1">
                <map:mount uri-prefix="" src="content/poc1.mydomain.com/sitemap.xmap" />
        </map:when>
        <map:when test="poc2">
                <map:mount uri-prefix="" src="content/poc2.mydomain.com/sitemap.xmap" />
        </map:when>
    </map:select>

But, nothing seems to be matching the hosts correctly...

Apache's NameVHosting fine, Tomcat's passing it on (I've tested content in the root of a context), but...I get this error in my Cocoon logs...

WARN    (2003-03-14) 14:58.10:198   [sitemap.selector.host] (/content/kevin.html) Ajp13Processor[8009][4]/NamedPatternsSelector: No configuration for expression 'poc1' -- failing.
WARN    (2003-03-14) 14:58.10:200   [sitemap.selector.host] (/content/kevin.html) Ajp13Processor[8009][4]/NamedPatternsSelector: No configuration for expression 'poc2' -- failing.

I guess I've got my HostSelector configured wrongly, but, I'm following this <http://wiki.cocoondev.org/Wiki.jsp?page=HostSelector> advice and getting nowhere...

Any suggestions?

Thanks

Kevin McDermott

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: HostSelector

Posted by Niclas Hedhman <ni...@internuscorp.com>.
I believe that there is something wrong in your Tomcat setup.

I have exactly the same Sitemap fragments, but using VirtualHost in Apache WS, 
and passing through Tomcat without change to the default configuration.

And that setup works well.



On Friday 14 March 2003 23:09, Kevin McDermott wrote:
> I'm running Cocoon 2.0.4 on IBMJDK 1.3.1.
>
> I've got Apache NameVirtualHosting, onto Tomcat 4.1.18, which is mapped to
> the same Cocoon instance.
>
> My sitemap.xmap has been stripped down and I've entered the following host
> setup
>
>    <map:selector logger="sitemap.selector.host" name="host"
> src="org.apache.cocoon.selection.HostSelector"/> <host name="poc1"
> value="poc1.mydomain.com"/>
>         <host name="poc2" value="poc2.mydomain.com"/>
>   </map:selectors>
>
> In my Main Pipeline, I've got
>
>     <map:select type="host">
>         <map:when test="poc1">
>                 <map:mount uri-prefix=""
> src="content/poc1.mydomain.com/sitemap.xmap" /> </map:when>
>         <map:when test="poc2">
>                 <map:mount uri-prefix=""
> src="content/poc2.mydomain.com/sitemap.xmap" /> </map:when>
>     </map:select>
>
> But, nothing seems to be matching the hosts correctly...
>
> Apache's NameVHosting fine, Tomcat's passing it on (I've tested content in
> the root of a context), but...I get this error in my Cocoon logs...
>
> WARN    (2003-03-14) 14:58.10:198   [sitemap.selector.host]
> (/content/kevin.html) Ajp13Processor[8009][4]/NamedPatternsSelector: No
> configuration for expression 'poc1' -- failing. WARN    (2003-03-14)
> 14:58.10:200   [sitemap.selector.host] (/content/kevin.html)
> Ajp13Processor[8009][4]/NamedPatternsSelector: No configuration for
> expression 'poc2' -- failing.
>
> I guess I've got my HostSelector configured wrongly, but, I'm following
> this <http://wiki.cocoondev.org/Wiki.jsp?page=HostSelector> advice and
> getting nowhere...
>
> Any suggestions?
>
> Thanks
>
> Kevin McDermott
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


AW: HostSelector

Posted by Marco Rolappe <m_...@web.de>.
hi kevin, 

in case you copy&pasted it may just be a typo:

>    <map:selector logger="sitemap.selector.host" name="host" 
> src="org.apache.cocoon.selection.HostSelector"/>
                                                ^^^
                                                element closed

I wonder if you're not getting any other errors because of this.

>         <host name="poc1" value="poc1.mydomain.com"/>
>         <host name="poc2" value="poc2.mydomain.com"/>
>   </map:selectors>



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


AW: HostSelector

Posted by Marco Rolappe <m_...@web.de>.
hi geoff,

I actually encountered the problem you mentioned and back then I just added
a '*' to match the port string.

from a quick look at the sources it seems to me that in the case of the
selector things are different; it seems to be checking for a substring
match.

> -----Ursprungliche Nachricht-----
> Von: cocoon-users-return-47863-m_rolappe=web.de@xml.apache.org
> [mailto:cocoon-users-return-47863-m_rolappe=web.de@xml.apache.org]Im
> Auftrag von Geoff Howard
> Gesendet: Samstag, 15. Marz 2003 05:11
> An: cocoon-users@xml.apache.org
> Betreff: RE: HostSelector
>
>
> Are you on port 80?  If not, try adding :8080 or whatever port you're
> using to the end of your host string - I seem to recall that this is
> necessary with the host matcher, and it seems reasonable to guess the
> the selector to be the same.
>
> Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


RE: HostSelector

Posted by Geoff Howard <co...@leverageweb.com>.
Are you on port 80?  If not, try adding :8080 or whatever port you're 
using to the end of your host string - I seem to recall that this is 
necessary with the host matcher, and it seems reasonable to guess the 
the selector to be the same.

Geoff

> -----Original Message-----
> From: Kevin McDermott [mailto:KevinMcDermottkevin.mcdermott@realise.com]
> Sent: Friday, March 14, 2003 10:10 AM
> To: cocoon-users@xml.apache.org
> Subject: HostSelector
> 
> 
> I'm running Cocoon 2.0.4 on IBMJDK 1.3.1.
> 
> I've got Apache NameVirtualHosting, onto Tomcat 4.1.18, which is 
> mapped to the same Cocoon instance.
> 
> My sitemap.xmap has been stripped down and I've entered the 
> following host setup
> 
>    <map:selector logger="sitemap.selector.host" name="host" 
> src="org.apache.cocoon.selection.HostSelector"/>
>         <host name="poc1" value="poc1.mydomain.com"/>
>         <host name="poc2" value="poc2.mydomain.com"/>
>   </map:selectors>
> 
> In my Main Pipeline, I've got 
> 
>     <map:select type="host">
>         <map:when test="poc1">
>                 <map:mount uri-prefix="" 
> src="content/poc1.mydomain.com/sitemap.xmap" />
>         </map:when>
>         <map:when test="poc2">
>                 <map:mount uri-prefix="" 
> src="content/poc2.mydomain.com/sitemap.xmap" />
>         </map:when>
>     </map:select>
> 
> But, nothing seems to be matching the hosts correctly...
> 
> Apache's NameVHosting fine, Tomcat's passing it on (I've tested 
> content in the root of a context), but...I get this error in my 
> Cocoon logs...
> 
> WARN    (2003-03-14) 14:58.10:198   [sitemap.selector.host] 
> (/content/kevin.html) 
> Ajp13Processor[8009][4]/NamedPatternsSelector: No configuration 
> for expression 'poc1' -- failing.
> WARN    (2003-03-14) 14:58.10:200   [sitemap.selector.host] 
> (/content/kevin.html) 
> Ajp13Processor[8009][4]/NamedPatternsSelector: No configuration 
> for expression 'poc2' -- failing.
> 
> I guess I've got my HostSelector configured wrongly, but, I'm 
> following this 
> <http://wiki.cocoondev.org/Wiki.jsp?page=HostSelector> advice and 
> getting nowhere...
> 
> Any suggestions?
> 
> Thanks
> 
> Kevin McDermott
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org