728x90 WEB/JSP20 [JSP] ch02-04. Parameter(파라미터) 2-4. Parameter(파라미터) IN / OUT paraGetIn.html 사용자명 숫자1 숫자2 paraOut.jsp 이 요청한 게산 결과는 + = WEB/JSP 2017. 11. 1. [JSP] ch02-03. Import 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; } } WEB/JSP 2017. 11. 1. [JSP] ch02-02. declaration 2-2. declaration 더하기 += WEB/JSP 2017. 11. 1. [JSP] ch02-01. scriptlet 2-1. scriptlet(스크립트릿) 디렉티브 --%> 더하기 + = + = WEB/JSP 2017. 11. 1. [JSP] ch01-04. LifeCycle 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.. WEB/JSP 2017. 11. 1. [JSP] ch01-03. 서블릿 클래스 GET, POST 방식 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... WEB/JSP 2017. 11. 1. [JSP] ch01-02. 서블릿 클래스 POST 방식 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.. WEB/JSP 2017. 11. 1. [JSP] ch01-01. 서블릿 클래스 GET 방식 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").. WEB/JSP 2017. 11. 1. 이전 1 2 다음 728x90