목록분류 전체보기 (70)
진이의 Developer Story
public static string example(String param1, String param2) throws Exception { StringBuffer response = new StringBuffer(); try { String url = "https://도메인"; URL obj = new URL(url); URLConnection conn = obj.openConnection(); String urlParameters = "param1=" + param1 +"¶m2=" + param2"; // POST 값 전송일 경우 true conn.setDoOutput(true); OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStr..
package com.exam.project.util; import javax.crypto.Cipher; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; import sun.misc.BASE64Decoder; import sun.misc.BASE64Encoder; public class AesCipher { private static final String algorithm = "AES/CBC/NoPadding"; private static final byte[] keyValue = new byte[] { 0x0E, 0x0E, 0x02, 0x01, 0x04, 0x05, 0x0D, 0x07, 0x07, 0x0..
(1) 원인 JDK를 찾지 못해 발생하는 현상 (2) 해결방안 eclipse 폴더 내 eclipse.ini 파일을 수정한다. -startup plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.300.v20150602-1417 -product org.eclipse.epp.package.jee.product --launcher.defaultAction openFile --launcher.XXMaxPermSize 256M -showsplash org.eclipse.platform --launcher.XXMaxPe..
희한하게 폼안에 가 하나만 존재할 경우 엔터키로 submit 되는 장면을 목격했습니다. 어떠한 자바스크립트도 들어가지 않은 상황인데, 도대체 엔터키로 submit이 되는걸까요? 구글링을 통해 검색을 여러번 해보았지만, 해결방법만 제시됐을 뿐 그 이유에 대해서는 어떠한 것도 적혀있지 않았습니다. 이유를 아시는 분은 댓글에 꼭 좀 적어주시길 바라며, 해결방법은 2가지입니다. (1) 보이지 않는 를 추가하기. 아래와 같이 input 태그를 하나를 더 삽입하면 더 이상 엔터키에 submit 되지 않습니다. 단 type을 hidden으로 줄 경우에는 submit이 작동하니, type을 text로 주시고 display 스타일 값을 이용해야 합니다. (2) form 태그 내에 onsubmit="return false..
1. POST 방식 web.xml 에 아래의 내용을 정의한다. encodingFilter org.springframework.web.filter.CharacterEncodingFilter false encoding UTF-8 2. GET 방식 server.xml 에 아래의 내용을 추가한다. (톰캣서버) // before // after
마이바티스 사용중 다음과 같은 에러가 발생하였을 시... WARN : org.springframework.beans.factory.support.DisposableBeanAdapter - Invocation of destroy method 'close' failed on bean with name 'sqlSessionTemplate': java.lang.UnsupportedOperationException: Manual close is not allowed over a Spring managed SqlSession 스프링 설정 중 매퍼 빈 정의 부분을 destroy-method="clearCache" 를 추가한다.
오류내용 java.lang.NoClassDefFoundError: org/junit/runners/model/MultipleFailureException at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.withAfterClasses(SpringJUnit4ClassRunner.java:188) at org.junit.runners.ParentRunner.classBlock(ParentRunner.java:145) at org.junit.runners.ParentRunner.run(ParentRunner.java:235) at org.springframework.test.context.junit4.SpringJUnit4ClassRunne..
package com.sample.board; import java.util.Iterator; import java.util.List; import javax.annotation.Resource; import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.A..
여태까지 작업한 내용의 중간 결과입니다. 그 많은 셋팅과 클래스를 작성했지만 결과물이 고작 이것밖에 안된다니... 하지만 기본 셋팅 이후에 하나씩 추가하는 작업은 그리 어렵지 않습니다 ^^ 지금은 리스트를 불러오기만 가능하지만, 글작성, 글보기, 조회수 증가 등등은 기존에 작성했었던 클래스를 약간 수정만 해주면 전부 가능합니다!! 지금은 VIEW를 먼저 작성해봐야 겠지요? (1) list.jsp 게시판 리스트 글번호 제목 글쓴이 날짜 조회수 ${list.idx } ${list.title } ${list.id } ${list.date } ${list.hit } 여기서 여러분이 아셔야 할 내용은 JSTL을 어떻게 사용하는지만 아시면 될듯합니다. 지난번 컨트롤러에서 리턴해준 model 값을 출력해주는 부분인데..
(1) BoardVO package com.sample.board.vo; import java.sql.Timestamp; public class BoardVO { private int idx; private String title; private String content; private String id; private String hit; private Timestamp date; public int getIdx() { return idx; } public void setIdx(int idx) { this.idx = idx; } public String getTitle() { return title; } public void setTitle(String title) { this.title = titl..