tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (David M. Karr)
Subject Re: Any way to import file as a resource?
Date Sun, 01 Sep 2002 04:26:05 GMT
>>>>> "David" == David M Karr <> writes:

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

    Martin> <c:import var="xml" url="/WEB-INF/web.xml"/>

    David> Hmm.  That wasn't working.  The resulting variable was empty.  I guess I'll
    David> have to track it in the debugger.  I don't see what could be wrong.

After tracking the "c:import of "/WEB-INF/web.xml", I don't see why I didn't
get anything.  However, I did try adding imports of several other files, to see
whether they worked or not:

/thing.xml:                     Worked
/dir/thing2.xml:                Worked
/WEB-INF/anotherThing.xml:      Failed
/WEB-INF/struts-config.xml:     Failed

Is this related to the restriction against directly serving files in the
WEB-INF directory?  I had no problem getting "/WEB-INF/web.xml" with the
bean:resource Struts tag.  All of these tests are running in TC 4.0.4.

David M. Karr          ; Java/J2EE/XML/Unix/C++

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

View raw message