struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From PC Leung <pc.le...@gmail.com>
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="http://java.sun.com/jsp/jstl/functions" 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?
or
Anyway to display graphics on tab index of Tiles layout without coding?

Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message