쌍용교육(JAVA)/Servlet

LifeCycle.java package kr.web.ch04; 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("/lifeCycle") public class LifeCycle extends HttpServlet{ int initCnt =0; int s..
TodayMenu package kr.web.ch03; 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("/todayMenu") public class TodayMenu extends HttpServlet { @Override public void doP..
method="get"를 쓴방식 GreetingServlet.java package kr.web.ch03; 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("/greeting") public class GreetingServlet extends HttpS..
ch01 HelloServlet.java package kr.web.ch01; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.annotation.WebServlet; //webservlet 어노테이션을 사용하기 위함. import java.io.PrintWriter; import java.io.IOException; @WebServlet("/helloServlet") // 톰캣에서 기본 경로는 막아둠 (불필요한 ..