분류 전체보기(145)
-
[MVC2 게시판] 5. 파일 업로드
1) WEB-INF > lib 폴더에 cos.jar 추가 2) BoardAddForm.jsp 12cs 2) insertController.java 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091@WebServlet("/boardInsert.do")public class BoardInsertController extends HttpServlet { protected void doPost(HttpServletRequest request, HttpSe..
2016.12.01 -
[MVC2 게시판] 4. 페이징(Paging)
1) memList.do 호출page, totalCount(전체 게시물 수) 세팅세팅과 동시에 paging()가 실행되며 prev,next,beginPage,endPage가 결정됨 2) dao.selectAllMember(page)page에 맞춰 startNum, endNum(마지막 게시글번호)이 결정됨.이것을 SQL에 넣어 startNum ~ endNum에 해당하는 게시글만 리스트에 저장 3) MemberList.jsp에 받아온 paging 객체 정보(page,begin,end,prev,next)를을 이용해 paging.jsp로 넘김 4) paging.jsp 구현paging 객체 정보에 맞게 출력하는 페이지 12345678910111213141516171819@WebServlet("/memList.do..
2016.11.28 -
Object Model(자바스크립트 개요), BOM, DOM
*document: , 등, 태그 이름 검색 기능 제공 getElementsByTagName()*BOM(Browser Object Model): alert나 confirm, prompt, window.open 같은 것*XMLHttpRequest(AJAX 통신의 주체) 1. BOM(브라우저 객체) 1) 새 창 열기window.open() 2) 창 크기 조절window.open(top,left,width,height 값 조절) 3) 새 창에 메시지 띄우기test.document.write('메시지'); 1234567891011121314window open(새 창 열기) 새 창 열기: window.open() 새 창 열기(크기 조절): window.open() 새 창 변수에 담기: window.open() ..
2016.11.28 -
상속(prototype)
상속은 propertype을 이용해 간단히 할 수 있다. Programmer.prototype = new Person(); 123456789101112131415161718192021222324//Person 객체function Person(name){ this.name = name;}Person.prototype.name=null;Person.prototype.introduce = function(){ return 'My name is '+this.name; } //프로그래머 생성자function Programmer(name){ this.name = name;} //프로그래머 생성, coding() 추가Programmer.prototype = new Person();Programmer.prototype..
2016.11.27 -
[MVC2 게시판] 3. 회원관리
1) C태그와 EL태그로 객체 배열 출력 ${mem.num} 2) DB 정보를 객체 배열에 담기List list = dao.selectAllMember();//컨트롤러에서while(rs.next()){ //DAO에서 Member mem = new Member(); mem.setNum(rs.getInt("num"));list.add(mem);return list;req.setAttribute("memList", list);//컨트롤러에서 3) request 객체로 현재 URL 경로 찾기request.getContextPath() => 프로젝트명 출력request.getRequestURI() => 프로젝트명/파일명request.getRequestURL() => http://localhost:8886/프로젝트..
2016.11.25 -
[MVC2 게시판] 2. 로그인
1) MVC 모델2 구현 방식2) 활용3) 로그인/로그아웃 처리법 1234567891011121314151617181920212223242526272829303132333435 ${param.msg} I D : pwd : 회원가입 ${sessionScope.id}님 환영합니다! 로그아웃 게시판 리스트 회원 관리 빈 페이지 Colored by Color Scriptercs ID 중복검사 결과 로그인 실패시 로그인 성공시 123456789101112131415161718192021222324252627282930313233cs 1234567891011121314151617181920212223242526@WebServlet("/memLogin.do")public class MemberLoginControll..
2016.11.25