본문 바로가기

Programming/Servlet & JSP

(28)
URL Mapping (url 맵핑) urlMapping.html URLMapping Servlet으로 접속! UrlMapping.java package com; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet("/test") public class URLMapping extends HttpServlet { @Override protected void serv..
servlet에서 ip체크, 구분하여 화면 보여주기 IpCheck.java package com; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet("/IpCheck") public class IpCheck extends HttpServlet { protected void service(HttpServlet..
체크박스(checkbox) 값 servlet으로 전달 PrintCheckbox.java package com; import java.io.IOException; import java.util.Arrays; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet("/ResultInfo") public class ResultInfo extends HttpServlet { protected void service(Ht..
html에서 servlet으로 값 전달 PrintText.java package com; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet("/Result") public class Result extends HttpServlet { protected void service(HttpServletRequest request, HttpServlet..