You would be able to do something using the JSTL functions like split()

<c:out value="${fn:split(messageSet.messages[MSG1].data, '\')[4]}"/>

but I don't think it will be very stable.

I think you would be better off manipulating the file names before you get to the JSP or you could make a taglib, using tokenize() for example, and using a few lines of code.

I haven't tried this but you could try making the object in .data a java.io.File, so you could do this:

<c:out value="${messageSet.messages[MSG1].data.name}"/>
and
<c:out value="${messageSet.messages[MSG1].data.fullPath}"/>

But I'm not sureit would work because java.io.File doesn't look like it can be treated like a javabean.



On 11/03/2004 09:43 AM andy wix wrote:
Hi,

I iterate through a collection and the following line yeilds the full path of a file:

<c:out value="${messageSet.messages[MSG1].data}"/>

where messages is a Map and MSG1 is the key.

The issue is that I would like only to display the file name, not the full path.

Can this be done with JSTL or should I revert to good old fashioned Java?


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to