Aaron,

Evidently I was mistaken. However, it is simple enough to add another default path to your profiling rule. Insert this immediately before the "path" criterion:

                                <Criterion name="navigation-3">
                                        <type value="navigation"/>
                                        <value value="/"/>
                                        <fallBackOrder value="6"/>
                                        <fallBackType value="2"/>
                                </Criterion>

And then modify the "path" criterion by bumping the fallback order:

                                <Criterion name="path">
                                        <type value="path"/>
                                        <value value="home"/>
                                        <fallBackOrder value="7"/>
                                        <fallBackType value="2"/>
                                </Criterion>

You can verify the resulting page search paths by enabling DEBUG logging for the Portal Site component, (org.apache.jetspeed.portalsite), and looking for search path messages.

Randy

Aaron Evans wrote:
Hi Randy,

We're using jetspeed 2.1.3 against LDAP.

Basically, we're using the subsite rule pretty much as it is defined
in the example in the documentation. I've pasted the XML below.

It works fine in the case that the request is made using a hostname
for which a directory exists in subsite-root/_hostname.

However, if you use a hostname that is *not* in there, then you end up
getting a "NodeNotFoundException":

 ERROR org.apache.jetspeed.profiler.impl.ProfilerValveImpl - No page
matched / request in site view.
org.apache.jetspeed.page.document.NodeNotFoundException: No page
matched / request in site view.
        at 
org.apache.jetspeed.portalsite.impl.PortalSiteSessionContextImpl.selectRequestPage(PortalSiteSessionContextImpl.java:645)
        at 
org.apache.jetspeed.portalsite.impl.PortalSiteSessionContextImpl.selectRequestPage(PortalSiteSessionContextImpl.java:228)
        at 
org.apache.jetspeed.portalsite.impl.PortalSiteRequestContextImpl.getPage(PortalSiteRequestContextImpl.java:213)
        at 
org.apache.jetspeed.portalsite.impl.PortalSiteRequestContextImpl.getManagedPage(PortalSiteRequestContextImpl.java:196)
        at 
org.apache.jetspeed.profiler.impl.ProfilerValveImpl.invoke(ProfilerValveImpl.java:241)

Subsite Profiling Rule Definition:

<ProfilingRule id="subsite-by-hostname-live" standardRule="false">
                        <description value="A rule based on role fallback 
algorithm with
specified subsite and home page"/>
                        <Criteria>
                                <Criterion name="navigation">
                                        <type value="navigation"/>
                                        <value value="subsite-root"/>
                                        <fallBackOrder value="0"/>
                                        <fallBackType value="2"/>
                                </Criterion>
                                <Criterion name="hostname">
                                        <type value="hostname"/>
                                        <fallBackOrder value="1"/>
                                        <fallBackType value="2"/>
                                </Criterion>
                                <Criterion name="user">
                                        <type value="user"/>
                                        <fallBackOrder value="2"/>
                                        <fallBackType value="2"/>
                                </Criterion>
                                <Criterion name="navigation-2">
                                        <type value="navigation"/>
                                        <value value="subsite-root"/>
                                        <fallBackOrder value="3"/>
                                        <fallBackType value="2"/>
                                </Criterion>
                                <Criterion name="hostname-2">
                                        <type value="hostname"/>
                                        <fallBackOrder value="4"/>
                                        <fallBackType value="2"/>
                                </Criterion>
                                <Criterion name="role">
                                        <type value="role"/>
                                        <fallBackOrder value="5"/>
                                        <fallBackType value="2"/>
                                </Criterion>                              
                                <Criterion name="path">
                                        <type value="path"/>
                                        <value value="home"/>
                                        <fallBackOrder value="6"/>
                                        <fallBackType value="2"/>
                                </Criterion>
                        </Criteria>
                </ProfilingRule>


On Mon, Apr 26, 2010 at 2:12 PM, Randy Watler <[email protected]> wrote:
Aaron,

The subsite rules should fallback to the root folder if they do not exist.

Let me know if that is not working for you and which rules you are using,

Randy

Aaron Evans wrote:
We're trying to use the subsite profiling features.  We've setup our
profiling rule like in the example here:

http://portals.apache.org/jetspeed-2/guides/guide-subsites.html

Here's the trick though:  we'd like it so that if there is no match on
the hostname (ie. there is no directory with the given hostname found
in __subsite-root/_hostname), then we'd like it to return to the pages
root.

Is this possible?

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to