On 5/3/05, Folashade Adeyosoye <[EMAIL PROTECTED]> wrote:
> Hi all,
> 
>    This might be a JSTL question more than a struts question, but I think
> developers might have run into this problem before while developing in
> Struts..
> 
> I was able to import my Yahoo forum into my portal like application, but the
> all the links are relative to my site rather than the yahoo site, any hints
> to get this to work.
> 
> <c:import  url="http://groups.yahoo.com/group/forumName/"/>
> 
> It shows up fine but the links defaults to my site.
> 

Actually, it's not even a JSTL question ... it's an issue of how HTML works.

The <c:import> tag, when you give it a URL, just includes the contents
returned by that URL into the current page, with no modifications.  If
the content includes relative links, they are going to be interpreted
as relative to *your* page (as you observed), unless you:

* Suck the contents into a buffer and physically modify all the
  links yourself before outputting it.

* Use a <base> element in your <head> section that points at
  the Yahoo page (but this will mess up any relative links you
  have in your content)

* Use frames so that the Yahoo page is loaded separately, and
  relative links will work as expected.

Craig


> .
> 
> Shardayyy
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to