1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<html>
<head>
<title>Using JSTL Functions</title>
</head>
<body>    
 
<c:set var="theString" value="I am a test String"/>    
 
<c:if test="${fn:contains(theString, 'test')}">       
    <p>Found test string<p>    
</c:if>    
 
<c:if test="${fn:contains(theString, 'TEST')}">       
    <p>Found TEST string<p>    
</c:if>
 
</body>
</html>
 
결과 Found test string
 
 
자바단에서,
if (str.indexOf(",") != -1) 이렇게 하면 되더군요 
if(str.contains(",")) 해도 될듯 하네요
 
 
 
cs


+ Recent posts