인디노트

JSP 에서 JSTL 적용이 안될때 , 예를 들어 ${msg} 가 그냥 출력될 때. 본문

소스 팁/HTML, Java Script, jQuery, CSS

JSP 에서 JSTL 적용이 안될때 , 예를 들어 ${msg} 가 그냥 출력될 때.

인디개발자 2020. 3. 15. 00:49

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>

반응형
Comments