[스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술] HTTP 응답 데이터
·
Back-End/Spring
[작성일: 2024. 07. 01] HTTPServletResponse - HTML 응답@WebServlet(name="responseHtmlServlet", urlPatterns = "/response-html")public class ResponseHtmlServlet extends HttpServlet { @Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //Content-Type: text/html;charset=utf-8 response.setContentType("text/htm..
[스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술] HttpServletResponse 기본 사용법
·
Back-End/Spring
[작성일: 2024. 06. 26] HttpServletResponse 역할HTTP 응답 메시지 생성HTTP 응답 코드 지정헤더 생성바디 생성편의 기능 제공Content-Type쿠키Redirect package hello.servlet.basic.response;import jakarta.servlet.ServletException;import jakarta.servlet.annotation.WebServlet;import jakarta.servlet.http.Cookie;import jakarta.servlet.http.HttpServlet;import jakarta.servlet.http.HttpServletRequest;import jakarta.servlet.http.HttpServletRespo..