tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Bayern <bay...@essentially.net>
Subject Re: Any way to import file as a resource?
Date Sun, 01 Sep 2002 20:45:07 GMT
On 1 Sep 2002, David M. Karr wrote:

> However, I've come to the conclusion that the "bean:resource" tag is
> still useful in the new library.  The only (well, ok, probably more
> than one :) ) reason "c:import" now works for XML files in "WEB-INF"
> is that there's no servlet mapped for that url pattern.  If I want to
> open a file in the application as a resource, I really should do
> exactly that.  I don't think there's any practical way to use
> "c:import" to load in the source code of a JSP page, for a
> "showSource" page, for instance.

You can use a JNDI resource path on servers that support it (including
Tomcat).  For instance,

 jndi:/localhost/myWebApp/foo.jsp

You're probably right that something spec'd through
ServletContext.getResource() might still have a use, though.

-- 
Shawn Bayern
"JSTL in Action"   http://www.jstlbook.com


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message