course 2021

course 2021/JDBC\DB

servlet02 - 03, 04, 05, 06

servlet03 S01AttributeServlet package servlet03; 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; /** * Servlet implementation class S01AttributeServlet */ @WebServlet("/servlet03/s01") public class S01At..

course 2021/JDBC\DB

servlet01 - 01, 02

교재 520p java 값 결과만 jsp 에게 전달하며, 그 후 jsp 가 최종응답 response 함 jsp(view) 는 자바코드를 받은 결과를 보여주는 역할을 함 java 는 어떤 일을 어떻게 할 지 어떤 jsp 를 선택해서 보여줄 지 무엇을 할 지 제어한다 여기서 java 가 (servlet) controller model view (mvc 패턴) * 추가검색 https://mangkyu.tistory.com/14 클라이언트의 요청을 처리하고 그 결과를 반환하는, servlet 클래스의 구현 규칙을 지킨 자바 웹 프로그래밍 기술 서블릿이란 자바를 사용하여 웹을 만들기 위해 필요한 기술 클라이언트가 어떤 요청을 하면 그에대한 결과를 다시 전송해주어야 하는데, 이러한 역할을 하는 자바 프로그램 예를 ..

course 2021/JSP

JSP17 - 14bootstrap

bootstrap 4버전: https://getbootstrap.com/docs/4.6/layout/overview/ Overview Components and options for laying out your Bootstrap project, including wrapping containers, a powerful grid system, a flexible media object, and responsive utility classes. getbootstrap.com w3schools bootstrap 4버전 튜토리얼: https://www.w3schools.com/bootstrap4/default.asp Bootstrap 4 Tutorial W3Schools offers free online tut..

course 2021/JSP

JSP16 - 13customTag

교재469 16chapter 커스텀태그 만들기 > 태그파일이 들어가는 위치는 정해져 있음 1. c:\apache-tomcat-8. O.21\,webapps\chap16 폴더를 생성 2. chap16 폴더에 WEB-INF 하위 폴더를 생성 3. WEB-INF 폴더에 lib 폴더를 생성하고 jstl-1. 2.jar 파일을 복사 4. WEB-INF 폴더에 tags 하위 폴더를 생성 webapp > WEB-INF > lib, (tags > 13tag) 폴더생성 13tag 우클릭 new - other - tag 검색 - JSP Tag 선택하여 파일명.tag 로 파일 생성하기 t01tag.tag, 01tag.jsp (t01tag.tag 는 tag 폴더 안에, 01tag.jsp 는 13customTag 폴더 안에) ..

course 2021/JSP

JSP15 - 12jstl

시작하기 전, jstl 을 사용하려면 https://tomcat.apache.org/download-taglibs.cgi Apache Tomcat® - Apache Taglibs Downloads Welcome to the Apache Taglibs download page. This page provides download links for obtaining the latest version of the Apache Standard Taglib, as well as links to the archives of older releases. You must verify the integrity of the downloaded files. We pro tomcat.apache.org tomcat 홈페이지 >..

course 2021/JSP

JSP14 - 11el(3)

41paramValues el paramValues 기본객체 0 : 1 : 2 : \${paramValues.param1[0] } : ${paramValues.param1[0] } \${paramValues.param1[1] } : ${paramValues.param1[1] } \${paramValues.param1[2] } : ${paramValues.param1[2] } el 로 안하면 로 꺼내야하고, el 로 하면 ${paramValues.param1[0]} 로 반환하면 된다는 거지 - paramValues : 요청 파라미터의 매핑을 저장한 Map 객체이다. 파라미터 값 타입은 String[] 로서 request.getParamaterValues(name)..

course 2021/JSP

JSP13 - 11el(2)

21map-baen Map map = new HashMap(); Bean04 obj = new Bean04(); obj.setNickName("korea"); obj.setAge(30000); obj.setVip(true); map.put("key1", obj); pageContext.setAttribute("data", map); pageContext.setAttribute("key1", "key1"); pageContext.setAttribute("nickName", "nickName"); pageContext.setAttribute("age", "age"); pageContext.setAttribute("vip", "vip"); pageContext.setAttribute("key2", "seoul..

course 2021/JSP

JSP12 - 11el

java bean 속성(데이터), 변경 이벤트, 객체 직렬화를 위한 표준. JSP 에서는 속성을 표현하기 위한 용도로 사용됨. get set 메소드에 의해 결정됨 property 의 이름은 get, set 메소드의 get, set 을 지우고 앞글자를 소문자로 함 ex) public String getValue1(){ return Value1; } public void setValue1(String value1){ Value1 = value1; } *property 값에는 읽기전용과 읽기/쓰기 가 있다 읽기전용 property: get 또는 is 메소드만 존재하는 property 읽기/쓰기 property: get/set 또는 is/set 메소드가 존재하는 property *property type 이 b..

course 2021/JSP

JSP11 - 10scope

01scope java web app 의 4개의 영역(영역=scope) -교재 132p 참고 1) page: 하나의 jsp 페이지 2) request: 하나의 http 요청 3) session: 하나의 브라우저 4) application: 하나의 웹 어플리케이션 02page page 영역 pageContext.~ request, response 같은 페이지라서 setAttribute 로 값을 넣고 getAttribute 로 값을 꺼낼 수 있다 (object 로 반환되므로 형변환) 03pageMain, pageSub main set 으로 pageAttr2 에 pageVal2 저장, sub 파일 갑자기 삽입, get 으로 pageAttr2 에 저장된 값 반환 sub get 으로 pageAttr2 값 반환 →..

course 2021/JSP

JSP10 - 09cookie

01cookie Request Headers 에 쿠키명=값 을 쌍으로 들고다님 쿠키를 주고받는 연습 쿠키는 브라우저, 세션은 서버에 저장 (설명 ↓ java.util.Enumeration getHeaderNames() Returns an enumeration of all the header names this request contains. If the request has no headers, this method returns an empty enumeration. Some servlet containers do not allow servlets to access headers using this method, in which case this method returns null 이 요청에 포함된 모..

코딩하는토끼
'course 2021' 카테고리의 글 목록 (4 Page)