struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From PC Leung <>
Subject how to substring with JSTL taglib
Date Thu, 20 Jan 2005 13:53:23 GMT
I do not know how to display graphics in tab index of Tiles layout.
So that I modify the tabsLayout.jsp to display graphics.

In order to do that, I try to check the tab index name if it is
ended with ".gif".

I add the taglib at the front of tabsLayout.jsp like this

<%@ taglib uri="" prefix="fn" %>

Then I substring the ending characters with the following codes.

<logic:iterate id="tab" name="tabList"
type="org.apache.struts.tiles.beans.MenuItem" >
  String suffix = ${fn:substringAfter(tab.getValue(), ".")};
  if ((suffix == "gif") || (suffix == "jpeg")) {

It fails to substring!!! 

What is the correct syntax of substring in JSP?
Anyway to display graphics on tab index of Tiles layout without coding?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message