일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- 싱글톤
- 자동형변환
- 스프링
- Java
- bootstrap
- 메소드
- 내장객체
- 언박싱
- 루프
- Short
- start.spring.io
- 제네릭
- wrapper
- 무한
- 인텔리제이
- dependency
- maven
- boxing
- 제너릭
- 클래스
- 컬렉션
- https://start.spring.io
- 빌드
- 박싱
- Scanner
- 싱글턴
- unboxing
- Jenkins
- 콜렉션
- suvlet
- Today
- Total
목록분류 전체보기 (447)
Developer Gonie
1) .filter() 선택자로 선택된 것들 중에서 한번 더 선택자를 주어 좀더 원하는 것을 수월하게 지정할 수 있다. 2) .not() filter가 선택하는 범위의 반대의 범위를 선택함 사용예시 * 속성의 값을 비교하는 filter 를 작성하는 추가적인 방법은 다음 링크를 참고하여 응용. https://ldgeao99-developer.tistory.com/351 .filter('.middle')// class 속성의 값이 'middle' 인것 필터링 .filter('#middle')// id 속성의 값이 'middle' 인것 필터링 .filter('div:odd') // div 태그들 중에서 홀수번째만 필터링 .filter('[id="third"]') // id가 third인것만 필러링 .filte..
사용예시 for(var i = 0; i < $('img').length-1; i++){ backSrc = $('img').eq(i+1).attr('src'); $('img').eq(i).attr('src', backSrc); }
DB에서 해당 데이터를 저장하기 위한 타입 사용자가 선택한 것들을 문자열 한줄로 이어붙여 저장할 예정이라서 varchar2 타입으로 저장한다.(이건 무조건 고정) 이어붙여 저장할 땐 ',' 혹은 ' ' 을 단어 사이사이 이어붙여 구분자를 넣은상태로 저장한다. Bean클래스에서 해당 데이터를 담기위한 타입 둘 다 사용 가능하고 어느 방식이든지 큰 불편함은 못 느꼈다. 두 방식으로 각각 모두 해보니 뭐가 더 쉽고, 어렵고의 차이는 없었다. 다만, 방식에 따라 고려해야할 것을 바로 알고 사용하면 될거같다. 1) 방법1, String 타입으로 하는 것(개인적으로 배열을 덜 다뤄서 쉬운편인거 같음) - 을 호출했을 때 체크박스로 여러개 선택한 값 중 맨 앞의 딱 1개만 bean 객체의 관련 변수에 바로 담긴다. ..
* 아래 글을 참고하면 태어난 년도, 월, 일 등을 선택할 수 있는 선택박스를 펼쳤을 때 보여지는 option 요소들을 반복문을 통해 구현하는 방법도 알 수 있다. 글의 제목이 의미하는바 수정 버튼을 눌러 화면이 이동했을 때 수정하고자 했던 정보들이 그대로 입력되어 있도록 할 수 있는 기능을 구현하고자 한다. 선택박스나 체크박스에 대해 이를 처리해 주는 것이 가장 어려웠음. 수정버튼을 누르게 되는 화면에서 꼭 추가해줘야 하는 부분 a 태그를 통해 get 방식으로 어떤 num 값을 가지는 행이 눌렸는지에 대한 정보를 전달해 줘야함. /* a태그에 파라미터 추가해서 get 방식으로 보내기 */ out.print(" 수정 "); out.print(" 삭제 "); out.print(""); 선택박스나 체크박스가..
다음은 updateProc.java에 대한 예시이다.(구조가 비슷해서 이것만) response.sendRedirect("select.jsp"); 로 구현하면 무언가 화면에 나타나기 전에 화면이 바로 넘어가므로 아래와 같이 마지막 부분 처럼 javascript로 처리해줄 수 있다 0){ msg = "수정성공"; url = "select.jsp"; //response.sendRedirect("select.jsp"); }else{ msg = "수정실패"; url = "updateForm.jsp"; //response.sendRedirect("insertForm.jsp"); } %>
* even, eq : index가 0부터 시작 * nth-child : index가 1부터 시작 * 선택자는 CSS에서 사용하던 분법을 그대로 사용할 수 있다. $('tr:nth-child(1)') 태그의 부모의 입장에서 첫번째 자식인데 인 것 + 모든 에 대해 적용 $('tr:first-child') 바로 위의 것과 같은 의미 $('tr:first') 태그의 부모의 입장에서 첫번째 자식인데 인 것 $('tr:nth-child(3n)') 태그의 부모의 입장에서 3의 배수번째 모든 자식인데 인 것 + 모든 tr에 대해 적용 3, 6, 9, 12,,, $('tr:nth-child(3n+1)') 태그의 부모의 입장에서 3의 배수 + 1 번째 모든 자식인데 인 것 + 모든 tr에 대해 적용 4, 7, 10, ..
JSP에서 다음 페이지로 데이터를 전달시키는 4가지 방법(참고) https://ldgeao99-developer.tistory.com/438 [9주차] 9. JSP에서 다음 페이지로 데이터를 전달시키는 4가지 방법 * 두번째, 세번째 방식은 get 방식으로 보내는 것과 같음 첫번째 방법 태그의 자식으로 이런 요소를 추가하여, 보내고 싶은 값을 value 속성에 넣어주고, 이동한 페이지에서 request 객체를 통해 접근 ldgeao99-developer.tistory.com 예시 Tip! insert 작업이 끝난뒤 select 결과를 보여주는 페이지로 이동하는데, 여기서는 수정,삭제, 삽입 등을 할 수 있다. 수정 혹은 삭제 클릭시 대상의 번호 값을 태그의 파라미터로 추가하여 보내는 것을 주의깊게 봐두자..
JavaBean이란? Bean 또는 VO(Value Object) 또는 DTO(Data Transfer Object) 라고도 한다. 데이터의 전달을 위해 만든 클래스로 데이터를 담을 private 멤버변수와 그 변수를 조작할 수 있는 public의 getter, setter 메서드로 구성된다. JavaBean 클래스의 내부 형태가 궁금하다면 참고할 링크(https://ldgeao99-developer.tistory.com/268) JavaBean을 다루는 액션태그 3가지 * 액션태그는 내부적으로 jsp의 내장객체 request를 이용한 동작을 수행하므로 사용시 맨 위의 라인에 request.setCharacterEncoding("UTF-8"); 을 적어두고 사용하는게 좋다. * 액션태그의 동작 결과를 이..
* 서블릿 파일의 확장자는 .java 이다. 이클립스에서 jsp 코드들을 작성 후 실행하면 위와 같은 과정을 거치게되어 다음과 같은 총 3군데에 비슷한 코드 파일들이 생성된다. 1) 워크스페이스에서 내가 코드를 작성한 위치 - 이클립스에서 작성한 코드 그대로 예상되는 위치에 그대로 있는 곳 - C:\JSP_ysy/ 이하 해당 프로젝트 이름의 폴더의 최하위로 이동했을 때 존재 2) 웹서버 폴더의 위치(업로드 기능을 사용하면 여기에 올라옴) - 1)에서 작성한 jsp파일이 그대로 복사되어 존재하며, 서버가 실행이 될 때 웹서버 폴더에 위치한 이 파일이 실제로 실행됨. - C:\JSP_ysy\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ 이하..
JSP에서의 DELETE 쿼리문 수행 deleteFrom.jsp -> deleteProc.jsp
JSP에서의 UPDATE 쿼리문 수행 updateFrom.jsp -> updateProc.jsp select.jsp 파일의 코드는 바로 이전 게시물 참고
태그란? meta 태그는 해당 문서에 대한 정보인 메타데이터(metadata)를 정의할 때 사용하는데, 이렇게 제공된 정보는 브라우저나 검색 엔진, 다른 웹 서비스에서 사용하게 된다. 메타데이터를 남겨두기 위해 사용할 수 있는 태그로 같은 요소들도 있는데 이것으로는 표현할 수 없는 메타데이터를 남기기 위해 meta 태그를 사용한다. 브라우저가 메타데이터를 이용하는 한 예시로(이건 meta 태그를 이용한게 아니지만) 태그에 텍스트를 남기면 브라우저는 이 정보를 이용해 브라우저의 창의 제목을 띄워준다. 태그로 수행할 수 있는 동작 예시 여러가지가 있지만 단, 한가지만 살펴보자면 아래와 같은 것이 있다. 5초 뒤에 다른 페이지로 리다이렉트(redirect)시키는 예제 meta 태그에 속성으로 http-equi..