프로그래밍/- JSP , Servlet

JSTL 의 출력이 그냥 ${msg} 로 될때

즐겁게 하하하 2022. 2. 7. 10:43
728x90

jsp 에서 JSTL 의 출력에 있어서 ${msg} 와 같은 출력이 값이 표시되지 않고 그냥 ${msg} 로 될때.

<%@ page isELIgnored="false" %> 만 추가하면 된다. 

 

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false" %>

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
</head>
<body>
    <h1>Spring MVC web service</h1>
    <h3>Return Message : <%= request.getAttribute("msg") %></h3>
    <h3>Return Message : <c:out value = "${msg}"/></h3>
</body>
</html>
728x90