For reference, here's a snippet from the JSTL 1.0 Spec., Section 3.1 Expressions
and Attribute Values:
It is also possible for an attribute to contain more than one EL expression,
mixed with static text. For example, the following would display "Price of
productName is productPrice" for a list of products.
<c:forEach var="product" items="${products}">
<c:out value="Price of ${product.name} is ${product.price}"/>
</c:forEach>
Quoting Kris Schneider <[EMAIL PROTECTED]>:
> <c:out value="/${path}${sound.fileName}"/>
>
> Quoting andy wix <[EMAIL PROTECTED]>:
>
> > Hi,
> >
> > I have been trying for about 4 hours to get something to work that would
> > take about 4 minutes using scriplets! (and I can find no reference to this
>
> > in my Core Jstl book).
> >
> > Basically, I have an arraylist of sound objects in the session and when the
>
> > user clicks one - it should play. The object only contains the filename
> so
> >
> > I need to prepend the path which is defined as a static variable in a
> class.
> >
> > So I have:
> >
> > <%
> > String path = UploadAction.PATH;
> > pageContext.setAttribute("path", path);
> > %>
> >
> > <c:forEach var="sound" items="${Sounds}" varStatus="status">
> > <tr>
> > <td>a href= XXXXXX ><c:out value="${sound.fileName}"/></a></td>
> > </tr>
> > </c:forEach>
> >
> > where XXXXXX is the problem bit. I want to concatenate "/" + path +
> > "${sound.fileName}" so that the href gets the full path and but only the
> > filename is displayed.
> >
> > Cheers,
> > Andy
>
> --
> Kris Schneider <mailto:[EMAIL PROTECTED]>
> D.O.Tech <http://www.dotech.com/>
--
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech <http://www.dotech.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]