2월, 2015의 게시물 표시

이클립스에서 톰캣 publish할때 에러

Tomcat 오류.. Could not delete xxx. May be locked by another process 에러 발생시 1. 이클립스에서 Tomcat SErver를 우클릭 후 Clean을 시킨다. 2. 이클립스 메뉴바에 Project -> Clean을 실행시킨다 3. Tomcat Server의 왼쪽을 누른 후 자신이 원하는 Project를 우클릭 후 Clean module work directory를 클릭한다 Resource is out of sync with file system. 에러 발생시 package Project뷰에서 F5를 눌러서 프로젝트폴더를 새로고침을 해주면 해결된다 java.lang.ClassNotFoundException : org.springframework.web.context.CointextLoaderListener 에러 발생시 1. 우선 웹프로젝트의 Deployment Assembly 에 라이브러리가 제대로 등록되지 않은 경우 프로젝트 >> properties >> Deployment Assembly를 선택한 후, "Add" >> Java Build Path Entries >> Maven Dependencies 선택한 후, "Apply"를 해준다. 2. eclipse project property에서 deploymentAssembly 카테고리가 사라졌을 경우 org.eclipse.wst.common.project.facet.core.nature 프로젝트 .project > natures 에 org.eclipse.wst nature를 추가한다. <?xml version="1.0" encoding="UTF-8"?> <projectDescription>   <name>snsbook</name>   <comm

BoneCP(Javadatabaseconnectionpool) 설정및사용-Spring의AppContext

BoneCP 설정 및 사용 * 예제 http://jolbox.com/index.html?page=http://jolbox.com/configuration-spring.html * 설정 <default-config> <!-- Sets the name of the pool for JMX and thread names. --> <!-- <property name="poolName">(null or no default value)</property> --> <!-- Sets the minimum number of connections that will be contained in every partition.      Also refer  to {@link #setPoolAvailabilityThreshold(int)}. --> <property name="minConnectionsPerPartition">0</property> <!-- Sets the maximum number of connections that will be contained in every partition.       Setting this to 5 with 3 partitions means you will have 15      unique connections to the database.  Note that the connection pool will not      create all these connections in one go but rather start off  with      minConnectionsPerPartition and gradually increase connections as required. --> <property name="maxConnectionsPerPartition&q

프로그램에서 LinkedHashMap의 활용 방법

이미지
프로그램에서 LinkedHashMap의 활용 방법 HashTable의 단점은 의도한 대로 정렬이 되지 않는다는 것이다. 즉 넣은 순서대로 값을 가져올 수 있는 것이 아니라, 내부적으로 HashCode에 의해 임의로 정렬이 일어난다. JDK 1.4 버전부터는 LinkedHashMap 객체를 사용하면, 넣은 순서대로 값을 가져올 수 있다. LinkedHashMap의 활용에 대해서는 아래 예제를 참고하면 된다. import java.util.*; public class LinkedHashMapTest {                 public static void main(String[] args) throws Exception {                                 LinkedHashMap lhm = new LinkedHashMap();                 lhm.put("1", "One");                 lhm.put("2", "Two");                 lhm.put("3", "Three");                 lhm.put("4", "Four");                 lhm.put("5", "Five");                 lhm.put("6", "Six");                 lhm.put("7", "Seven");                 lhm.put("8", "Eight");                 lhm.put("9", "Nine");                                 Iterator