JSTL标签开发积累

1、判断字符串中包含某个值,格式: ,值, 

                            <c:when test="${obj.moduleen eq 'gczlgl' && obj.state eq '是'}">
                       <%
                               String cityIds = DefaultSettings.get("gczlgl.use.cityIds");
                        String useFlag = DefaultSettings.get("gczlgl.use.flag");
                               if(cityIds == null) cityIds = "";
                               cityIds = cityIds.trim();
                               request.setAttribute("cityIds",cityIds);
                               request.setAttribute("useFlag",useFlag);
                              %>
                              <c:set var="belongCityId" value=",${userSession.companyId}," />
                              <c:if test="${useFlag eq 'true'}">
                              <c:if test="${empty cityIds || fn:indexOf(cityIds,belongCityId) gt -1}">
                               <td><a href="javascript:void(0);" onClick="updateCTR('${obj.classify }','${obj.moduleen }','${obj.modulecn}'),openNewWin('${obj.url}','${obj.moduleen }')"><img src="jsp/irms/workPlatform/frameset_light/images/${obj.icon }" onMouseOver="this.src='jsp/irms/workPlatform/frameset_light/images/${obj.touchicon}'" onMouseOut="this.src='jsp/irms/workPlatform/frameset_light/images/${obj.icon}'" /></a></td>
                              </c:if>
                              </c:if>

你可能感兴趣的:(jstl标签)