I'm not sure why you say <c:import> won't work. You can do this, which I
think is what you want:

  <c:import var="xml" url="/WEB-INF/web.xml"/>
  <x:parse var="web" xml="${xml}"/>

Now you can manipulate the parsed XML stored in 'web'.

If you specifically need a DOM instance (instead of an
implementation-specific representation), you can use the 'varDom' attribute
of the <x:parse> tag, instead of the 'var' attribute.

--
Martin Cooper


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, August 31, 2002 5:08 PM
> To: [EMAIL PROTECTED]
> Subject: Any way to import file as a resource?
> 
> 
> Is there a practical way to import a file as a resource?  The 
> "c:import" tag
> doesn't quite work.  For example, I'd like to read in the 
> "/WEB-INF/web.xml"
> file and parse/display it.  I can do this with Struts 
> (bean:resource), but I'd
> like to know for sure whether I can or can't do it with pure JSTL.
> 
> I need this to work for other files besides XML files, so an 
> identity transform
> with x:transform wouldn't be sufficient.
> 
> -- 
> ===================================================================
> David M. Karr          ; Java/J2EE/XML/Unix/C++
> [EMAIL PROTECTED]
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 
> 


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

Reply via email to