728x90
taglib 선언
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
fn:contains 예제
<c:set var = "testStr" value = "test string"/>
<c:if test = "${fn:contains(testStr, 'test')}">
<span>문자열 포함</span>
</c:if>
<c:if test = "${fn:contains(testStr, 'hello')}">
<span>문자열 미포함</span>
</c:if>
https://roundfigure.tistory.com/26
[JSTL] fn:contains 포함되는 문자열 찾기
fn:contains를 사용하여 포함되는 단어를 찾을 수 있다 boolean contains(java.lang.String, java.lang.String) fn:contains - 포함되는 문자열이 있으면 true를 반환한다 taglib 선언 <%@ prefix="c" taglib uri=..
roundfigure.tistory.com
728x90
'JSP' 카테고리의 다른 글
${param.~} (0) | 2022.02.22 |
---|---|
대중적 스프링 프레임워크 모듈 (0) | 2021.12.24 |
request에 attribute추가해서 redirect하기.. (0) | 2021.12.23 |
리스트 타입으로 저장한 request.setAttribute()를 request.getAttribute할땐 리스트 타입으로 받자 (0) | 2021.12.23 |
[JSP] 세션, 어플리케이션 사용 (0) | 2021.12.23 |
댓글