Servlet (11) 썸네일형 리스트형 앙케이트 조사// 링크를 <button>을 통한 자바스크립트로 보냄 나이 미입력시 다시 index.html로 복귀 html 앙케이트 조사입니다 이름 나이 좋아하는 과일 사과 배 바나나 송신 java public class HelloServlet extends HttpServlet{ @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String name = req.getParameter("name"); String sAge = req.getParameter("age"); System.out.println("name:" + name); System.out.println("age:" + sAge); int age .. text입력받아 링크로 넘기기 html Servlet java public class HelloServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { System.out.println("HelloServlet doGet"); createHTML("GET방식", req, resp); } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { System.out.prin.. Servlet 기본 기본 개념 Server + Applet = Servlet Web(html, client) Server Java(String, Object(Class)) Server DB Server Web BrowerWeb Application Server(WAS) client ----(request:(http://x.x.x.x:8090/projext명/index.html))-> Web Server, Web Container servlet Class 등록 1. servlet의 name은 servlet-mapping의 name은 동일해야 한다 2. class는 클래스가 있는 주소 이름 3. url-pattern : helloServlet sample01.HelloServlet helloServlet.. 이전 1 2 다음