Does anyone know how to use the import tag to access dynamic content from the
current context?

I naively thought this would do it...

<c:set var="url" value="/x/y/z"/>
<c:import url="${url}" var="xml" />


<c:set var="url" value="x/y/z"/>
<c:import url="${url}" var="xml" />

Where /x/y/z is a (context)relative path that my application maps to a
servlet. However this doesn't seem to work because the import tag doesn't
expand the url and make a request. It does, to be honest, what it's name
suggests it should and just tries to import the content statically from the
given path.

Actually I am trying to import xml for parsing here, but it seems that the
xml parse tag only works upon a document in some scope and not against a
URL. So I appear to be a bit stuck. 

I found this...

<c:set var="xmlURL"
<c:import url="${xmlURL}" var="xml" />

and it works. But I cannot believe this is the right way to it.

Paul B.
View this message in context:
Sent from the Taglibs - User mailing list archive at

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

Reply via email to