본문 바로가기

개발하자

(326)
EL)param 주소창: http://localhost:8090/jsp_test1/test2.jsp?a=100&b=200&c=b ============================================================ ${param.a} ${param.b} ${param.c}
쿠키 이용한 아이디 기억하기 예제 welcome.jsp =================================== 로그인해주세요~ top.jsp =================================== 서울IT교육센터 Guest님 즐거운시간되세요~ template.jsp ==================================== menu.jsp ========================================= 총방문자수: 현재접속자수: 회원리스트 직원리스트 로그인 로그아웃 logout.jsp ========================================= loginSuccess.jsp =============================================== loginRe.jsp ====..
회원리스트 클릭시 db에서 테이블 가져와서 원하는 인덱스 순서대로 뿌리기(이중each문 사용) welcome to SEOUL IT Education Center~!!! 로그인 회원리스트
useBean useBean1.jsp ============ 회원정보보기 useBean2.jsp ============
회원리스트 클릭시 순서있는 리스트로 db id뿌리기 welcome to SEOUL IT Education Center~!!! 로그인 회원리스트
doPost protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub request.setCharacterEncoding("EUC-KR"); response.setContentType("text/html; charset=EUC-KR"); ServletContext application=getServletContext(); application.getInitParameter("xxx"); // web.xml Context-param 을 불러옴 ServletConfig config = getServletC..
load-on-startup 양or음수 디폴트:음수 음수 -요청이 들어왔을때 객체를 메모리에 생성 양수 -톰캣 실행했을때 객체를 메모리에 생성 최초 호출할때만 init() 이 호출되고 - 초기화작업할때 init에서 다함 그이후로는 요청이 오면무조건 service()만 호출됨 그래서 service 인자값이 request 랑 response가 있다.
서블릿에서 db아이디목록 불러와서 b.jsp에 뿌리기 Test1 ====================================== doPost(){ List list=MemberDAOImpl.getInstance().selectMemberList(); request.setAttribute("memberlist",list); RequestDispatcher rd=request.getRequestDispatcher("a.jsp"); rd.forward(request,response); } a.jsp =====