"David S. Faller" wrote:
>
> ----- Original Message -----
> From: "Riley, Cameron" <[EMAIL PROTECTED]>
> To: "'Turbine'" <[EMAIL PROTECTED]>
> Sent: Thursday, December 07, 2000 2:24 PM
> Subject: RE: Absolute URLs in HTML code
>
> > David,
> >
> >
> > >My problem is the fact that the URLs in the returned HTML code are
> > >absolute addresses!
> >
> > The $link Context reference doesnt have to be used if you dont want it.
> You
> > can create your own class by extending DynamicURI that will return a URI
> in
> > the format you wish by accessing the ServerData Object. So all your
> > templates can see it, extend VelocityScreen by adding your URI class to
> the
> > doBuild method. Then make all your screens extend this class. Have a look
> at
> > the Context Document on the website, it has an example for Images and
> > StaticLinks that use a similar methodology;
>
> I see what you mean. My problem is about the way your standard Context
> reference works:
> Jetspeed's Navigation classes directly use DynamicURI without any
> VelocityScreen I could extend.
> There are many other references to your DynamicURI I don't want to change...
>
> Besides that, the main issue is the HTML style: If this class produces the
> URIs for $link it is simply bad style to always return absolute URLs. The
> portal with its HTML code is not flexible enough to be used in more complex
> environments as we use it.
>
Your patch looks interesting, but I think it is not well done. If should
compare the generated URL with the original one (in the Request used to
create the DynamicURI), and only use relative URIs if they are
compatible with the request.
I think that this approach could be studied, maybe through a different
method (toRelativeURI()) or something similar. When we (Jetspeed
developers) subclass DynamicURI in jetspeed to take care of portlet
parameter isolation, we could consider something similar.
In the meantime, I think you should change your patch so that it takes
into account that a Relative URI is only relative with regards to the
base URI (i.e. the one used to build the DynamicURI).
> >
> > http://java.apache.org/turbine/context-howto.html
> >
> >
> >
> >
> >
> >
> > Cameron Riley
> >
> >
> > ------------------------------------------------------------
> > To subscribe: [EMAIL PROTECTED]
> > To unsubscribe: [EMAIL PROTECTED]
> > Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> > Problems?: [EMAIL PROTECTED]
> >
> >
>
> ------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?: [EMAIL PROTECTED]
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]