Re: Runtime expressions with <img:image>

Kris Schneider <[email protected]>
Newsgroups gmane.comp.jakarta.taglibs.user
Message-ID <[email protected]>
Hassan Schroeder wrote:
> Robert Bowen wrote:
> 
> 
>>No, "path = ${path} does not work. I am using JSTL 1.0 and Servlet 2.4.
>>
>>So can I do this? ...Without changing versions of JSTL / Servlet?
> 
> 
> short answer: no. Though I'm not sure where that <img:... tag comes
> from, haven't used it myself.

Well, "no" is maybe too short an answer. At worst you should be able to do 
something like:

<img:image src='<%= (String)pageContext.getAttribute("path") %>'/>

> But if you're using a 2.4 deployment descriptor -- check what's at
> the beginning of your application's web.xml -- upgrading to JSTL 1.1
> is as simple as downloading and replacing a couple of jar files...
> 
> And well worth it, IMO -- replacing all those `<c:out value="${path}"/>`
> statements with `${path}` cleans up a workspace most wonderfully :-)

Agreed. If you can upgrade, it's a good idea for a number of reasons.

> FWIW!

-- 
Kris Schneider <mailto:[email protected]>
D.O.Tech       <http://www.dotech.com/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.