В вашем коде есть две проблемы:
Во-первых, вам нужно использовать "
или '
вместо
Then you need to can not set parameter in javascript side and get it via
$ {t} ,due to
$ {t} `- выражение EL
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<% String t="TEST"; %> <!-- set value in the server side -->
<script>
console.log("테스트 데이터 ${t}");
</script>
<body>
</body>
</html>