Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 46705 invoked by uid 500); 16 Apr 2001 12:23:35 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 46694 invoked from network); 16 Apr 2001 12:23:35 -0000 Message-ID: <3ADAE3C9.95137B08@apache.org> Date: Mon, 16 Apr 2001 08:21:29 -0400 From: Berin Loritsch X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: Standardizing Redirect in Cocoon References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Donald Ball wrote: > > On Fri, 13 Apr 2001, Berin Loritsch wrote: > > > > > and if the "context:" protocol is specified, then the URL should be > > > > relative to the context root. This should be easy in Cocoon 2, because > > > > we are limiting the access to the redirect function--I don't know about > > > > Cocoon 1. > > > > > > Can you explain a bit in detail? > > > > Basically something like this: > > > > Current URI: "http://localhost/cocoon/foo/bar/index.html" > > Current context: "cocoon" > > > > CURRENTLY DONE BY SERVLET API > > Redirect-to: "/index.html" maps to "http://localhost/index.html" > > Redirect-to: "../index.html" maps to "http://localhost/cocoon/foo/index.html" > > > > NEW FUNCTIONALITY > > Redirect-to: "context://index.html" maps to "http://localhost/cocoon/index.html" > > > > If the context is moved to "margaritaville/parrothead" > > then the context urls won't have to be changed > > ("http://localhost/margaritaville/parrothead/index.html") > > to go to the new location. > > > > Absolute urls like "/cocoon/index.html" won't work in that case, they > > would have to be changed in the code. > > +1. i was also thinking about how to link to c2 resources as well. fer > instance, suppose i have an image located at > > context://resources/images/pretty.gif > > in a webapp mounted at 'foo'. the only way i can reliably link to that > image across all of the pages in my webapp is to link to > > '/foo/resources/images/pretty.gif' > > i'd think it would be pretty cool to have a filter which would check for > context urls in certain HTML elements (a:href, img:src, etc.) and > translate context: urls appropriately. anyone else think this would be > useful? Yup. That would be useful, but probably best done as a transformer. The transformer would be very light weight. --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org