본문 바로가기

JAVA/JSP & Servlet

JSTL [Core 라이브러리] : set

 

 

<%@ page language="java" contentType="text/html; charset=UTF-8"

    pageEncoding="UTF-8"%>

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

 

<!--

        JSTL

               jakarta.apache.org -> jstl.java.net

 -->

 

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>JSTL 코어 라이브러리 : set</title>

</head>

<body>

 

<c:set var="num1" value="7" />

<c:set var="num2" value="9" />

<c:set var="result" value="${num1*num2}" />

 

num1( ${num1 } ) num2( ${num2 } ) 곱은 ${result}<br>

 

</body>

</html>