ContainsIgnoreCase in JSP -


hi want search word in given string in jsp , using string.contains(). case sensitive , want ignore case. have tried string.containsignorecase("") showing error. there other way? searched , found code use

<c:set var="thestring" value="i test string"/><c:if test="${fn:containsignorecase(thestring, 'test')}"> <p>found test string<p> 

but not working. can other ways?

btw talking jstl functions tag. has containsignorecase function. expecting jsp has jstl tag references:

    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>     <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>         .....     <c:set var="thestring" value="i test string"/>     <c:if test="${fn:containsignorecase(thestring, 'test')}"><p>found test string</p></c:if> 

you need close p , c:if tags.


Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -