Spring MVC / HttpServletRequest
rlaehddnd0422
HttpServletRequest HTTP ์์ฒญ ๋ฉ์์ง๋ฅผ ํ์ฑํด์ ๊ฒฐ๊ณผ๋ฅผ HttpServletRequest ๊ฐ์ฒด์ ๋ด์์ ์ ๊ณตํฉ๋๋ค. HttpServletRequest๋ฅผ ์ฌ์ฉํ๋ฉด HTTP ์์ฒญ ๋ฉ์์ง๋ฅผ ํธ๋ฆฌํ๊ฒ ์กฐํํ ์ ์์ต๋๋ค. HTTP ์์ฒญ ๋ฉ์์ง POST /save HTTP/1.1 // start-line Host : localhost:8080 // header Content-Type : application/x-www-unlencoded username=dongwoong&age=25 // body ์ถ๊ฐ์ ์ผ๋ก ์์ ์ ์ฅ์ ๊ธฐ๋ฅ, ์ธ์
๊ด๋ฆฌ ๊ธฐ๋ฅ๋ ์ ๊ณตํฉ๋๋ค. 1) ์์ ์ ์ฅ์ ๊ธฐ๋ฅ์ ํด๋น HTTP ์์ฒญ์ด ์์๋ถํฐ ๋๋ ๋ ๊น์ง ์ ์ง๋๋ ์์์ ์ฅ์ ๊ธฐ๋ฅ์ผ๋ก, setAttribute(name,valu..