views:

28

answers:

1

I'm trying to call my custom tag from the JSTL tag <c:url>. Because of the quotes, the custom tag is shown as a string instead of a tag. Can I use an escape character here?

<img align="left" src="<c:url value='/getFile/getfile?<myTag:getValue type="web"  name="person" />'/>" alt="person" title="person" width="55" height="70"/>
+3  A: 

You'll have to assign the output of your custom tag to a temp variable first and then use it

<c:set var="urlquerystring"><myTag:getValue type="web" name="person" /></c:set>

<img align="left" src="<c:url value='/getFile/getfile?${urlquerystring}'/>" alt="person" title="person" width="55" height="70"/>
JoseK