기본 콘텐츠로 건너뛰기

JSP

taglib
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsp/jstl/functions"%>

forEach 문
<c:forEach var="item" value="${list}">${item.value}</c:forEach>
<c:forEach varStatus="i" begin="0" end="10">
    ${i.index}
</c:forEach>

if 문
<c:if test="${조건문}">
</c:if>
<c:if test="${not empty status}">
</c:if>

else if 문
<c:choose>
    <c:when test="${조건문}">
    </c:when>
    <c:otherwise>
    </c:otherwise>
</c:choose>

문법
== : eq,
!= : ne,
null == : empty
null != : not empty

변수 선언
<c:set var="length" value="${f:length(list)}">

이 블로그의 인기 게시물

Grid 정렬

  .container { display : grid ; gap : 22px ; width : 1000px ; grid-template-columns : repeat ( auto-fit , 150px ); margin : auto ; justify-content : center ; } .container {      display : grid ; gap : 22px ; grid-template-columns : repeat ( auto-fit , minmax ( 250px , 1fr )); }

Python 변수

지역 변수 a 전역 변수 밖에서 선언한 변수를 사용할 때 앞에 global 을 붙여준다     global a