Thanks Hans for your quick response.
In fact, I didn't phrase my question right. The data is a path of an image. The expression doesn't work in the situation. I have to use the script as the followings: <% if(prov.getPhotoPaths() == null) { %> <IMG SRC="<%=request.getContextPath()%>/images/no_photo.gif" NAME="No Photo Available" ALIGN=BOTTOM BORDER=0> <% } else { %> <IMG SRC="<%=(prov.getPhotoPaths())[0]%>" NAME="Photo" ALIGN=BOTTOM BORDER=0> <% } %> <IMG SRC="${prov.photoPaths[0]}"> doesn't seem to work. 9/10/2002 5:01:53 PM, Hans Bergsten <[EMAIL PROTECTED]> wrote: >Vernon Wu wrote: >> I need to access the first element of array using JSTL. After a few of trial and >error, I don't success without using the >> iteration tag. I don't image that is a difficult one, but just don't know how. >> >> Thanks for your cue. > >Use an EL expression like this: ${myArray[0]} > >Hans >-- >Hans Bergsten [EMAIL PROTECTED] >Gefion Software http://www.gefionsoftware.com >JavaServer Pages http://TheJSPBook.com > > >-- >To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>