[JSP] ch02-04. Parameter(파라미터)
·
WEB/JSP
2-4. Parameter(파라미터) IN / OUT paraGetIn.html 사용자명 숫자1 숫자2 paraOut.jsp 이 요청한 게산 결과는 + =
[JSP] ch02-03. Import
·
WEB/JSP
2-3. import WebContent/ch02/ex03/import.jsp src/ch02/ex03/Addr.java public class Adder { public int add(int num1, int num2){ return num1+num2; } }
[JSP] ch02-02. declaration
·
WEB/JSP
2-2. declaration 더하기 +=
[JSP] ch02-01. scriptlet
·
WEB/JSP
2-1. scriptlet(스크립트릿) 디렉티브 --%> 더하기 + = + =
[JSP] ch01-04. LifeCycle
·
WEB/JSP
1-4. LifeCycle @WebServlet("/ch01/ex04/lifecycle") public class LifeCycle extends HttpServlet { private int initCnt = 0; private int doGetCnt = 0; private int destroyCnt = 0; public void init(ServletConfig conf) throws ServletException{ System.out.printf("intiCnt: %d\n", ++initCnt); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOExcept..
[JSP] ch01-03. 서블릿 클래스 GET, POST 방식
·
WEB/JSP
1-3. 서블릿 클래스 Get, Post방식 전송 @WebServlet("/ch01/ex03/home/add") public class DoGetPost extends HttpServlet { private static final long serialVersionUID = 1L; public void process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { int num1 = 1; int num2 = 2; response.setContentType("text/html;charset=utf-8"); PrintWriter out = response.getWriter(); out...
[JSP] ch01-02. 서블릿 클래스 POST 방식
·
WEB/JSP
1-2. 서블릿 클래스 Post방식 전송 @WebServlet("/ch01/ex02/add") public class DoPost extends HttpServlet { private static final long serialVersionUID = 1L; protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { int num1 = 1; int num2 = 2; response.setContentType("text/html;charset=utf-8"); PrintWriter out = response.getWriter(); out.println("PO..
[JSP] ch01-01. 서블릿 클래스 GET 방식
·
WEB/JSP
1-1. 서블릿 클래스 Get방식 전송 @WebServlet("/ch01/ex01/add") public class DoGet extends HttpServlet { private static final long serialVersionUID = 1L; protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { int num1 = 1; int num2 = 2; response.setContentType("text/html.charset=utf-8"); PrintWriter out = response.getWriter(); out.println("GET")..