반응형
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<link href="<%=request.getContextPath()%>/resources/css/styles.css">
<script
    src="<%=request.getContextPath()%>/resources/js/dashboard/dashboard.js"></script>
<!-- request.getContextPath는 webapp의 경로이다. -->
이클립스 server.xml 에서 port=8080과 port=8009 두 개의 connector에 URIEncoding="UTF-8"을 추가한다.
    <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"  URLEncoding="UTF-8"/>
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" URLEncoding="UTF-8"/>
    
request.setCharacterEncoding("UTF-8")
response.setCharacterEncoding("UTF-8")
response.setContentType("text/html; charset=utf-8")

 

 

반응형