You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Howard M. Lewis Ship" <hl...@attbi.com> on 2003/04/14 22:01:06 UTC
RE: web application context switching
In this case, you might want to use the HTML <base> tag.
You could have the Shell component's delegate emit this tag.
Yes, you could find all the link components and explicitly set their
renderer to an absolute renderer, but that's not a great solution, since it
would be hard to verify that you found ALL of them. Using the <base> tag is
better.
It would not be too hard to extend the Shell component to do this (render a
<base> tag) automatically, triggered by a boolean parameter. Perhaps you
should look into that and submit a patch? I'm behind on the book and things
are beginning to back up, so I can't check it out myself at this time.
--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry
> -----Original Message-----
> From: joe panico [mailto:joe@panmachine.biz]
> Sent: Monday, April 14, 2003 4:44 PM
> To: tapestry user
> Subject: web application context switching
>
>
> I have a tapestry page, of arbitrary content, that I access
> through the usual tapestry web application mechanisms
> (PageLink to it from other tapestry pages in the application).
>
> I would also like to send this tapestry page out as html email.
>
> In the first case, Tapestry would normally generate URLs
> within that page that are relative to the currently active
> web application (or Servlet) context. In the second case, the
> page needs to have absolute URLs.
>
> Of course, I could build the links in the page by hand, with
> the help of various ServiceLink classes, to always use
> absolute URLs. But I'm wondering if there is an easier way to
> do this. Is there some way to tell tapestry to generate
> absolute URLs for all hrefs (any ServiceLinks) under certain
> special conditions, in a page that would otherwise normally
> use standard relative URLs?
>
> any ideas appreciated,
>
> joe
>
> --
> Open WebMail Project (http://openwebmail.org)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
RE: web application context switching
Posted by joe panico <jo...@panmachine.biz>.
> In this case, you might want to use the HTML <base> tag.
That's a good idea-- I completely forgot about the <base> tag. I'll give it a
shot and let you know how well it works.
regards,
joe
--
Open WebMail Project (http://openwebmail.org)
---------- Original Message -----------
From: "Howard M. Lewis Ship" <hl...@attbi.com>
To: "'Tapestry users'" <ta...@jakarta.apache.org>, <jo...@panmachine.biz>
Sent: Mon, 14 Apr 2003 16:01:06 -0400
Subject: RE: web application context switching
> In this case, you might want to use the HTML <base> tag.
>
> You could have the Shell component's delegate emit this tag.
>
> Yes, you could find all the link components and explicitly set their
> renderer to an absolute renderer, but that's not a great solution,
> since it would be hard to verify that you found ALL of them. Using
> the <base> tag is better.
>
> It would not be too hard to extend the Shell component to do this
> (render a <base> tag) automatically, triggered by a boolean
> parameter. Perhaps you should look into that and submit a patch?
> I'm behind on the book and things are beginning to back up, so I
> can't check it out myself at this time.
>
> --
> Howard M. Lewis Ship
> Creator, Tapestry: Java Web Components
> http://jakarta.apache.org/tapestry
>
> > -----Original Message-----
> > From: joe panico [mailto:joe@panmachine.biz]
> > Sent: Monday, April 14, 2003 4:44 PM
> > To: tapestry user
> > Subject: web application context switching
> >
> >
> > I have a tapestry page, of arbitrary content, that I access
> > through the usual tapestry web application mechanisms
> > (PageLink to it from other tapestry pages in the application).
> >
> > I would also like to send this tapestry page out as html email.
> >
> > In the first case, Tapestry would normally generate URLs
> > within that page that are relative to the currently active
> > web application (or Servlet) context. In the second case, the
> > page needs to have absolute URLs.
> >
> > Of course, I could build the links in the page by hand, with
> > the help of various ServiceLink classes, to always use
> > absolute URLs. But I'm wondering if there is an easier way to
> > do this. Is there some way to tell tapestry to generate
> > absolute URLs for all hrefs (any ServiceLinks) under certain
> > special conditions, in a page that would otherwise normally
> > use standard relative URLs?
> >
> > any ideas appreciated,
> >
> > joe
> >
> > --
> > Open WebMail Project (http://openwebmail.org)
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
------- End of Original Message -------