As I read the spec, something like this should work:
        <c:set var="url" value="/x/y/z"/>
        <c:import var="doc" url="${url}"/>
        <x:parse varDom="dom" doc="${doc}"/>

The <c:import> should dispatch to the servlet at "/x/y/z" in your application 
and store the response in ${doc} as a String. The <x:parse> should then parse 
that String into a Document stored in ${dom}.

If that's not working for you can you open a bug (ideally with something to 
reproduce the error or best of all a patch) and I'll look in to it.

On Jul 29, 2010, at 3:03 AM, paulbrickell wrote:

> Then you're not doing it the way I have described.
> I have been battling with this for ages. Every time I want to import
> dynamically generated xml document it doesn't work. The URL gets mangled by
> the import tag.
> I can use the request parameters to form a full URL but that doesn't work
> for a secure app because the credentials aren't shared.
> Create a Jersey web service and use the tags as I have described. Just
> doesn't work at all. I have resorted to writing my own tag. 
> Hey ho.
> Hassan Schroeder-2 wrote:
>> On Wed, Sep 16, 2009 at 7:05 AM, paulbrickell
>> <> wrote:
>>> 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.
>> No, what you're describing works exactly correctly for me -- the
>> URL is accessed, and the rendered output, not a file, is fetched.
>> What value does ${aURL} display?
>> -- 
>> Hassan Schroeder ------------------------
>> twitter: @hassan
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> -- 
> View this message in context: 
> Sent from the Taglibs - User mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to