Re: import tag for dynamic content
paulbrickell <[email protected]> Wed, 16 Sep 2009 07:05:46 -0700 (PDT)
| Newsgroups | gmane.comp.jakarta.taglibs.user |
|---|---|
| Message-ID | <[email protected]> |
Hassan,
If I create a url with a context relative path (e.g. /x/y/z) and the I use
this in the url attribute of an import tag, the import tag seems to attempt
a lookup of a file in the web application.
So given this...
<c:url var="aURL" value="/x/y/z"/>
${aURL} Get resource at z
<c:import url="${aURL}" var="xml" />
The link in href attribute in the browser is a valid url, but the url
attribute in the import tag is not. I get a file not found exception for
/x/y/z. Import seems to want to lookup a static resource (html page for
example) located on the file system and not open connection to some network
resource. I am assuming from the name (import) that this is probably what is
expected. Doesn't help me though.
If I set the value in the URL to /x/y/z.html (assuming that resource exists)
all is well. So the question is can I 'import' dynamic content (from a
servlet in my case) rather than a static resource?
I guess I could point my URL to a JSP that 'includes' the content I want,
assuming that include works properly. I still think I am missing something.
Cheers,
Paul B.
Hassan Schroeder-2 wrote:
>
> On Wed, Sep 16, 2009 at 12:43 AM, paulbrickell
> <[email protected]> wrote:
>
>> Agreed. Just doesn't work.
>
> ? Uh, "doesn't work" exactly how?
>
> This
> <c:url var="xmlURL" value="/x/y/z"/>
> sets `xmlURL` to a very different value compared to your original
> <c:set var="url" value="x/y/z"/>
>
> What's the exact error?
> --
> Hassan Schroeder ------------------------ [email protected]
> twitter: @hassan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
--
View this message in context: http://www.nabble.com/import-tag-for-dynamic-content-tp25450335p25473112.html
Sent from the Taglibs - User mailing list archive at Nabble.com.