'2008/05'에 해당되는 글 19건
- 2008/05/29
- 2008/05/27
- 2008/05/26
- 2008/05/26
- 2008/05/25
- 2008/05/24
- 2008/05/23
- 2008/05/22
- 2008/05/22
- 2008/05/20
- 2008/05/19
- 2008/05/17
- 2008/05/16
- 2008/05/13
- 2008/05/06
- 2008/05/05
- 2008/05/03
- 2008/05/03
- 2008/05/02
| 오라클 디비 포트 변경 방법 (0) | 2008/06/26 |
|---|---|
| div 설명 (0) | 2008/06/08 |
| 이클립스 관련 (0) | 2008/05/29 |
| eclipse 3.3 europa + mysql Connection Pool 설정시 오류 및 설정 방법 (0) | 2008/05/27 |
| 로컬 디비 연결 관련 (0) | 2008/05/26 |
| 서버 접속 참고 녀석 (0) | 2008/05/25 |
http://disse77.tistory.com/65?srchid=BR1http%3A%2F%2Fdisse77.tistory.com%2F65
에서 퍼온 글입니다.
책만 보고 설정을 하다 보니 아래 오류가 나와서 알아보니 tomcat 버젼 별 설정과
eclipse 는 설정이 다르더라 .
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
블로그를 한 100여개 넘도록 알아보니 대충 문제는 알겠는데
문제 해결은 안되고 이것저것 해보다가 6시간만에 문제 해결 ;;
우선 톰켓 5.5* 이상 부터는 Connection Pool 설정시에 server.xml 과 web.xml 에
별도로 내용을 설정할 필요없이 context.xml 설정만 하면 된다 .
eclipse europa 를 쓰면서 답답한 것은 기존 것과 패턴이 많이 바뀌면서
인터넷에 자료가 너무 없다. 해서 다른이에게 도움이 될까해서 남겨놓는다.
일단 http://commons.apache.org/ 사이트에서 아래 commons 파일을 다운 받아서
1. commons-pool-1.4.jar
2. commons-dbcp-1.2.2.jar
3. commons-collections-3.2.jar
C:\workspace\study\WebContent\WEB-INF\lib 에 복사한다.
나는 eclipse 3.3 europa wtp all-in-one 를 설치해서 사용한다.
europa 에서 Dynamic Web Project 로 jsp 파일을 만들게 되면
WebContent 에 jsp 파일이 저장된다.
C:\tomcat\conf 안에 보면 context.xml 파일이 있다.
이 파일을 복사해서
C:\workspace\Servers\Tomcat v5.5 Server at localhost-config 안에 복사한다.
현재 나는 eclipse + tomcat 5.5 + mysql 를 설치하여 사용한다.
자신이 사용하는 편한 편집기로 context.xml 을 연 후에
각자의 설치 사항에 맞게 설정하면 된다. 나는 editplus를 사용했다.
그림을 클릭하면 크게 보임
| div 설명 (0) | 2008/06/08 |
|---|---|
| 이클립스 관련 (0) | 2008/05/29 |
| eclipse 3.3 europa + mysql Connection Pool 설정시 오류 및 설정 방법 (0) | 2008/05/27 |
| 로컬 디비 연결 관련 (0) | 2008/05/26 |
| 서버 접속 참고 녀석 (0) | 2008/05/25 |
| 앞으로 자주 쓸 듯해서... db접속 관련 코드 (0) | 2008/05/20 |
| 첫번째 미니 라이프 사용기 (0) | 2008/05/26 |
|---|---|
| 미니 라이프 베타 테스터로 뽑히다 (0) | 2008/05/23 |
| 서울시 문화 위젯 달기 이벤트 당첨 (1) | 2008/05/02 |
| 샨새교... (0) | 2008/04/01 |
| 충치 치료 (0) | 2008/03/29 |
| 위젯 추가 (0) | 2008/03/26 |
| 이클립스 관련 (0) | 2008/05/29 |
|---|---|
| eclipse 3.3 europa + mysql Connection Pool 설정시 오류 및 설정 방법 (0) | 2008/05/27 |
| 로컬 디비 연결 관련 (0) | 2008/05/26 |
| 서버 접속 참고 녀석 (0) | 2008/05/25 |
| 앞으로 자주 쓸 듯해서... db접속 관련 코드 (0) | 2008/05/20 |
| JSP의 작은 실수 하기 쉬우 부분 (0) | 2008/05/05 |
| eclipse 3.3 europa + mysql Connection Pool 설정시 오류 및 설정 방법 (0) | 2008/05/27 |
|---|---|
| 로컬 디비 연결 관련 (0) | 2008/05/26 |
| 서버 접속 참고 녀석 (0) | 2008/05/25 |
| 앞으로 자주 쓸 듯해서... db접속 관련 코드 (0) | 2008/05/20 |
| JSP의 작은 실수 하기 쉬우 부분 (0) | 2008/05/05 |
| 과제 참고 소스 (0) | 2008/03/18 |
package com.tistory.special0strawberry;
public class Run
{
// 메인 함수
public static void main(String[] args)
{
IntArray a, b, c;
Sort s = new Sort();
Add add = new Add();
a = new IntArray();
b = new IntArray();
System.out.print("첫번째 ");
a.UserInput();
s.BubbleSort(a);
System.out.print("\n첫번째 ");
a.PrintArray();
System.out.print("\n두번째 ");
b.UserInput();
s.SelectSort(b);
System.out.print("\n두번째 ");
b.PrintArray();
c = add.ArrayAdd(a, b);
s.SelectSort(c);
System.out.print("\n세번째 ");
c.PrintArray();
}
}
package com.tistory.special0strawberry;
public class Sort
{
// 입력값 : 정렬할 IntArray 포인터
// 버블 정렬을 통해 배열을 정렬한다.
public void BubbleSort(IntArray a)
{
int temp, temp_1, temp_2;
for(temp = 0; temp < a.GetArrayLength() - 1; temp++)
{
for(temp_1 = 0; temp_1 < a.GetArrayLength() - temp - 1; temp_1++)
{
if(a.GetArrayValue(temp_1) > a.GetArrayValue(temp_1 + 1))
{
temp_2 = a.GetArrayValue(temp_1 + 1);
a.SetArrayValue(temp_1 + 1, a.GetArrayValue(temp_1));
a.SetArrayValue(temp_1, temp_2);
}
}
}
}
// 입력값 : 정렬할 IntArray 포인터
// 선택 정렬을 통해 배열을 정렬한다.
public void SelectSort(IntArray i)
{
int temp, choice, temp_1, temp_2;
for(temp = 0; temp < i.GetArrayLength(); temp++)
{
choice = temp;
for(temp_1 = temp; temp_1 < i.GetArrayLength(); temp_1++)
{
if(i.GetArrayValue(temp_1) < i.GetArrayValue(choice))
{
choice = temp_1;
}
}
temp_2 = i.GetArrayValue(choice);
i.SetArrayValue(choice, i.GetArrayValue(temp));
i.SetArrayValue(temp, temp_2);
}
}
}
| scjp 1.4 지료 (0) | 2008/07/03 |
|---|---|
| 자바 코드(병합 프로그램_선택 정렬 추가) (0) | 2008/05/24 |
| 자바 코드(병합 프로그램) (0) | 2008/05/22 |
| 자바 코드(숫자 바꾸기) (0) | 2008/05/22 |
축하드립니다!
싸이월드의 새로운 서비스,
미니라이프의 베타테스터로
선정되셨습니다.
5월 26일부터 6월 8일까지
미니라이프를 재미있게 이용해주시면, 도토리 1만개 등 푸짐한 선물을
드립니다.
※ 미니라이프 서비스는 5월 26일
오후 2시 이후부터 사용하실 수
있습니다.
보다 자세한 내용은
아래의 “자세히 보기”를 클릭하세요.
- 사이좋은 사람들, 싸이월드
싸이월드 새로운 서비스 미니 라이프가 베타 테스트를 시작하나보다.
싸이월드 요새 하강하는 추세인것 같은데...
블로그형으로 선보인 홈2가 처음 서비스인 미니 홈피만큼의 관심을 끌지 못하였는데...
이번 서비스를 통해 얼마나 다시 부흥(?)하려나...
| 첫번째 미니 라이프 사용기 (0) | 2008/05/26 |
|---|---|
| 미니 라이프 베타 테스터로 뽑히다 (0) | 2008/05/23 |
| 서울시 문화 위젯 달기 이벤트 당첨 (1) | 2008/05/02 |
| 샨새교... (0) | 2008/04/01 |
| 충치 치료 (0) | 2008/03/29 |
| 위젯 추가 (0) | 2008/03/26 |
두 개의 배열을 합하는 프로그램
사용자로부터 두 개의 배열을 입력받아 하나의 배열로 만든다.
모든 배열을 정렬되어야 한다.
public class Run
{
// 메인 함수
public static void main(String[] args)
{
IntArray a, b, c;
Sort s = new Sort();
Add add = new Add();
a = new IntArray();
b = new IntArray();
a.UserInput();
s.BubbleSort(a);
a.PrintArray();
b.UserInput();
s.BubbleSort(b);
b.PrintArray();
c = add.ArrayAdd(a, b);
s.BubbleSort(c);
c.PrintArray();
}
}
import java.util.*;
public class IntArray
{
int[] number;
Scanner scan;
// 생성자
// 키보드 입력을 위해 Scanner 객체 생성
public IntArray()
{
scan = new Scanner(System.in);
}
// 반환값 : 배열의 크기
// 배열의 크기를 반환한다.
public int GetArrayLength()
{
return number.length;
}
// 입력값 : 배열위치
// 반환값 : 배열위치에 저장된 정수값
// 지정 위치에 저장된 값을 반환한다
public int GetArrayValue(int position)
{
return number[position];
}
// 입력값 : 배열의 크기
// 배열을 입력값에 맞는 크기로 설정한다.
public void SetArrayLength(int length)
{
number = new int[length];
}
// 입력값 : 배열의 위치, 저장될 값
// 배열의 위치에 저장될 값을 저장한다.
public void SetArrayValue(int position, int value)
{
number[position] = value;
}
// 사용자로 부터 배열의 크기와 각 배열의 값을 받아온다.
public void UserInput()
{
int temp, temp_1;
System.out.print("배열의 크기를 입력하세요 : ");
temp = scan.nextInt();
this.SetArrayLength(temp);
for(temp_1 = 0; temp_1 < this.GetArrayLength(); temp_1++)
{
System.out.print(temp_1 + "번째 값을 입력하세요 : ");
temp = scan.nextInt();
this.SetArrayValue(temp_1, temp);
}
}
// 배열에 저장된 값을 출력한다
public void PrintArray()
{
int temp;
System.out.println("저장된 배열의 값");
for(temp = 0; temp < this.GetArrayLength(); temp++)
{
System.out.println((temp + 1) + "번째 값 : " + this.GetArrayValue(temp));
}
}
}
public class Sort
{
// 입력값 : 정렬할 IntArray 포인터
// 버블 정렬을 통해 배열을 정렬한다.
public void BubbleSort(IntArray a)
{
int temp, temp_1, temp_2;
for(temp = 0; temp < a.GetArrayLength() - 1; temp++)
{
for(temp_1 = 0; temp_1 < a.GetArrayLength() - temp - 1; temp_1++)
{
if(a.GetArrayValue(temp_1) > a.GetArrayValue(temp_1 + 1))
{
temp_2 = a.GetArrayValue(temp_1 + 1);
a.SetArrayValue(temp_1 + 1, a.GetArrayValue(temp_1));
a.SetArrayValue(temp_1, temp_2);
}
}
}
}
}
public class Add
{
// 입력값 : 합칠 IntArray 포인터 2개
// 반환값 : 합쳐진 IntArray 포인터
// 두개의 IntArray를 합친다.
public IntArray ArrayAdd(IntArray a, IntArray b)
{
IntArray result = new IntArray();
int temp;
result.SetArrayLength(a.GetArrayLength() + b.GetArrayLength());
for(temp = 0; temp < a.GetArrayLength(); temp++)
{
result.SetArrayValue(temp, a.GetArrayValue(temp));
}
for(temp = 0; temp < b.GetArrayLength(); temp++)
{
result.SetArrayValue(temp + a.GetArrayLength(), b.GetArrayValue(temp));
}
return result;
}
}
| scjp 1.4 지료 (0) | 2008/07/03 |
|---|---|
| 자바 코드(병합 프로그램_선택 정렬 추가) (0) | 2008/05/24 |
| 자바 코드(병합 프로그램) (0) | 2008/05/22 |
| 자바 코드(숫자 바꾸기) (0) | 2008/05/22 |
// 숫자를 입력받아 반대로 출력하는 프로그램
// 예 : 123456 -> 654321
package com.tistory.special0strawberry;
import java.util.*;
public class Integer_Print
{
private int x;
private int division;
private int[] result;
private Scanner scan;
// 생성자
// 내용 : 변수의 초기화
public Integer_Print()
{
setX(0);
setDivision(1);
scan = new Scanner(System.in);
}
// 입력값 : 배열의 크기
// 내용 : result 배열의 크기를 정한다.
public void Set_Result_Length(int s)
{
result = new int[s];
}
// 입력값 : 배열 위치의 값, 배열의 위치
// 내용 : 배열의 위치에 맞는 값을 넣는다.
public void Set_Result_Position(int n, int p)
{
result[n] = p;
}
// 반환값 : 배열의 크기
// 내용 : 배열의 크기를 반환한다.
public int Get_Result_Length()
{
return result.length;
}
// 입력값 : 배열의 위치
// 반환값 : result 배열의 위치의 값
// 내용 : 배열 중에서 위치에 맞는 값을 반환한다.
public int Get_Result_Position(int p)
{
return result[p];
}
// 입력값 : 정수형 변수 i
// 내용 : x의 값을 i로 정한다.
public void setX(int i)
{
x = i;
}
// 반환값 : 정수형 값
// 내용 : x의 값을 반환한다.
// 반환값 : x의 값
// 내용 : x의 현재값을 반환한다.
public int getX()
{
return x;
}
// 입력값 : 정수형 변수 d
// 내용 : division의 값을 d로 정한다.
// 입력값 : 정수값
// 내용 : division의 값을 정수값으로 정한다.
public void setDivision(int d)
{
division = d;
}
// 반환값 : 정수형 값
// 내용 : division의 값을 반환한다.
// 반환값 : division의 값
// 내용 : division의 값을 반환한다.
public int getDivision()
{
return division;
}
// 내용 : 정수 값을 키보드로 부터 받아온다.
public int Scan()
{
int result;
System.out.print("정수의 값을 입력하세요 : ");
result = scan.nextInt();
return result;
}
// 내용 : division의 값을 계산한다.
public void Cal_Division()
{
int temp;
int temp_1;
temp = getX();
temp_1 = getDivision();
while(true)
{
if((temp / temp_1) == 0)
{
break;
}
else
{
temp_1 *= 10;
}
}
setDivision(temp_1);
}
// 내용 : 값이 들어갈 배열의 크기를 계산한다.
public void Cal_Result_Length()
{
Set_Result_Length((int)Math.log10(getDivision()) + 1);
}
// 내용 : 값을 배열에 집어 넣는다.
public void Input_Result()
{
int temp, x_value, input_value, number, cal_number;
x_value = getX();
number = 0;
cal_number = 0;
for(temp = Get_Result_Length() - 1; temp > 0; temp--)
{
// 배열에 들어갈 값 계산
input_value = x_value % 10;
x_value /= 10;
// 정수값 계산
cal_number *= 10;
cal_number += input_value;
Set_Result_Position(number, input_value);
Set_Result_Position(this.Get_Result_Length() - 1, cal_number);
number++;
}
}
// 내용 : result배열의 값을 화면에 출력한다.
public void Print_Result()
{
int length;
System.out.println("number : " + this.getX());
System.out.println("result : " + this.Get_Result_Position(this.Get_Result_Length() -1));
for(length = 0; length < this.Get_Result_Length() - 1; length++)
{
System.out.println(length + " : " + this.Get_Result_Position(length));
}
}
// 내용 : 프로그램을 시작한다.
public void Start()
{
setX(Scan());
Cal_Division();
Cal_Result_Length();
Input_Result();
Print_Result();
}
}
| scjp 1.4 지료 (0) | 2008/07/03 |
|---|---|
| 자바 코드(병합 프로그램_선택 정렬 추가) (0) | 2008/05/24 |
| 자바 코드(병합 프로그램) (0) | 2008/05/22 |
| 자바 코드(숫자 바꾸기) (0) | 2008/05/22 |
<%@ page contentType = "text/html;charset=euc-kr" %>
<%@ page import = "java.sql.*" %>
<%
Connection con = null;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:dbMember", "sa", "123456");
out.println("제대로 연결이 되었습니다.");
}
catch(Exception e)
{
e.printStackTrace();
}
%>
| eclipse 3.3 europa + mysql Connection Pool 설정시 오류 및 설정 방법 (0) | 2008/05/27 |
|---|---|
| 로컬 디비 연결 관련 (0) | 2008/05/26 |
| 서버 접속 참고 녀석 (0) | 2008/05/25 |
| 앞으로 자주 쓸 듯해서... db접속 관련 코드 (0) | 2008/05/20 |
| JSP의 작은 실수 하기 쉬우 부분 (0) | 2008/05/05 |
| 과제 참고 소스 (0) | 2008/03/18 |
보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.
| 대구 다녀오면서 찍은 사진들 (0) | 2008/07/02 |
|---|---|
| 명지대학교 용인캠퍼스 기숙사 사진 (0) | 2008/06/19 |
| 서울시 위젯 이벤트 물건 도착 (0) | 2008/05/16 |
| 5005번 버스 (0) | 2008/05/13 |
| 명지대와 성균관대 축구 시합 (0) | 2008/05/06 |
| 집근처 봄기운 (0) | 2008/04/26 |
| 명지대학교 용인캠퍼스 기숙사 사진 (0) | 2008/06/19 |
|---|---|
| 서울시 위젯 이벤트 물건 도착 (0) | 2008/05/16 |
| 5005번 버스 (0) | 2008/05/13 |
| 명지대와 성균관대 축구 시합 (0) | 2008/05/06 |
| 집근처 봄기운 (0) | 2008/04/26 |
| 명동 쇼핑 (0) | 2008/04/26 |
| 서울시 위젯 이벤트 물건 도착 (0) | 2008/05/16 |
|---|---|
| 5005번 버스 (0) | 2008/05/13 |
| 명지대와 성균관대 축구 시합 (0) | 2008/05/06 |
| 집근처 봄기운 (0) | 2008/04/26 |
| 명동 쇼핑 (0) | 2008/04/26 |
| 2008년 3월 24일 아침 (0) | 2008/03/25 |
| eclipse 3.3 europa + mysql Connection Pool 설정시 오류 및 설정 방법 (0) | 2008/05/27 |
|---|---|
| 로컬 디비 연결 관련 (0) | 2008/05/26 |
| 서버 접속 참고 녀석 (0) | 2008/05/25 |
| 앞으로 자주 쓸 듯해서... db접속 관련 코드 (0) | 2008/05/20 |
| JSP의 작은 실수 하기 쉬우 부분 (0) | 2008/05/05 |
| 과제 참고 소스 (0) | 2008/03/18 |
| 스크린 터치 이벤트 (0) | 2008/05/03 |
|---|---|
| 바인딩 (0) | 2008/05/03 |
| 안드로이드 어플리케이션 삭제 (2) | 2008/04/07 |
| 안드로이드 교육용 문서 (0) | 2008/04/01 |
| 안드로이드 API 정리 (0) | 2008/03/04 |
| 사소한 질문 (0) | 2008/03/03 |