You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Joern Nettingsmeier <po...@uni-duisburg.de> on 2006/01/03 14:19:56 UTC

fallback question (1.4)

hi *!


does the fallback:// uri resolver keep its context when fallback calls
are nested?

for example, consider this:

pubs/<my-pub>/config/some.xml references
fallback:///config/some_other.xml, which is not present in <my-pub>.
iiuc, it will now be searched in <template-of-my-pub>. say it exists
there. if this file now references fallback:///config/a_third_file.xml,
will this be taken from <my-pub> or <template-of-my-pub> ?

thanks,

jörn


-- 
"Án nýrra verka, án nútimans, hættir fortíðin að vekja áhuga."
"Without new works, without the present the past will cease to be of
interest."
        - Ásmundur Sveinsson (1893-1982)

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-duisburg.de, Telefon: 0203/379-2736


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: fallback question (1.4)

Posted by Andreas Hartmann <an...@apache.org>.
Joern Nettingsmeier wrote:
> hi *!
> 
> 
> does the fallback:// uri resolver keep its context when fallback calls
> are nested?
> 
> for example, consider this:
> 
> pubs/<my-pub>/config/some.xml references
> fallback:///config/some_other.xml, which is not present in <my-pub>.
> iiuc, it will now be searched in <template-of-my-pub>. say it exists
> there. if this file now references fallback:///config/a_third_file.xml,
> will this be taken from <my-pub> or <template-of-my-pub> ?

The critical lines are in FallbackSourceFactory.java:

   Request request = ContextHelper.getRequest(this.context);
   String webappUrl = 
request.getRequestURI().substring(request.getContextPath().length());

   URLInformation info = new URLInformation(webappUrl);
   String publicationId = info.getPublicationId();


This means the Context which is passed to the SourceFactory object is
used to determine the current publication. In most cases, this is
<my-pub> (if the Context hasn't been manipulated).

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org