Programming/jsp2014. 4. 1. 18:32
"jdbc:oracle:thin:@myhost:1521:orcl"

jdbc를 통해 (java)
oracle db에 (database server type)
thin driver를 통해
myhost 라는 서버에
1521 번 포트로
orcl 데이터베이스에 접속(database name)



Understanding the Forms of getConnection()

Specifying a Databse URL, User Name, and Password

The following signature takes the URL, user name, and password as separate parameters:

getConnection(String URL, String user, String password);

Where the URL is of the form:
  jdbc:oracle:<drivertype>:@<database>

The following example connects user scott with password tiger to a database with SID orcl through port 1521 of host myhost, using the Thin driver.

Connection conn = DriverManager.getConnection
  ("jdbc:oracle:thin:@myhost:1521:orcl", "scott", "tiger");

------------
Oralce provides four types of JDBC driver.

Thin Driver, a 100% Java driver for client-side use without an Oracle installation, particularly with applets. The Thin driver type is thin. To connect user scott with password tiger to a database with SID (system identifier) orcl through port 1521 of host myhost, using the Thin driver, you would write :
  Connection conn = DriverManager.getConnection
  ("jdbc:oracle:thin:@myhost:1521:orcl", "scott", "tiger");
  
OCI Driver for client-side use with an Oracle client installation. The OCI driver type is oci. To connect user scott with password tiger to a database with SID (system identifier) orcl through port 1521 of host myhost, using the OCI driver, you would write :
  Connection conn = DriverManager.getConnection
  ("jdbc:oracle:oci:@myhost:1521:orcl", "scott", "tiger");
  
Server-Side Thin Driver, which is functionally the same as the client-side Thin driver, but is for code that runs inside an Oracle server and needs to access a remote server, including middle-tier scenarios. The Server-Side Thin driver type is thin and there is no difference in your code between using the Thin driver from a client application or from inside a server.
 
Server-Side Internal Driver for code that runs inside the target server, that is, inside the Oracle server that it must access. The Server-Side Internal driver type is kprb and it actually runs within a default session. You are already "connected". Therefore the connection should never be closed.
To access the default connection, write:
  DriverManager.getConnection("jdbc:oracle:kprb:");
  or:
  DriverManager.getConnection("jdbc:default:connection:");

[링크 : http://docs.oracle.com/cd/E11882_01/appdev.112/e13995/oracle/jdbc/OracleDriver.html

'Programming > jsp' 카테고리의 다른 글

jsp / tomcat connection pool  (0) 2014.04.02
jsp jdbc 기본 코드  (0) 2014.04.01
jsp action tag / <jsp:useBean  (0) 2014.03.31
jsp cookie  (0) 2014.03.31
jsp 액션 태그 - <jsp:  (0) 2014.03.28
Posted by 구차니
quantumDB는 아직 eclipse 마켓 플레이스에는 지원하지 않는다 -_-a
결국은 걍 다운받아서 설치해야 한다는 것!!




[링크 : http://quantum.sourceforge.net/]
    [링크 : http://sourceforge.net/projects/quantum/files/quantum-plugin/]


jdbc driver (oracle 계정필수)
[링크 : http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-10201-088211.html] 10g
[링크 : http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-111060-084321.html] 11g
Posted by 구차니
grant는 사용자 권한을 부여해주는 명령어이다.
이거 쓰기 힘들어서 맨날 myphpadmin 쓰니 ^^;;;;;

 grant [권한목록] on [dbname] to [account]@[server] identified by [password]

GRANT
    priv_type [(column_list)]
      [, priv_type [(column_list)]] ...
    ON [object_type] priv_level
    TO user_specification [, user_specification] ...
    [REQUIRE {NONE | ssl_option [[AND] ssl_option] ...}]
    [WITH with_option ...]

object_type:
    TABLE
  | FUNCTION
  | PROCEDURE

priv_level:
    *
  | *.*
  | db_name.*
  | db_name.tbl_name
  | tbl_name
  | db_name.routine_name

user_specification:
    user [IDENTIFIED BY [PASSWORD] 'password']

ssl_option:
    SSL
  | X509
  | CIPHER 'cipher'
  | ISSUER 'issuer'
  | SUBJECT 'subject'

with_option:
    GRANT OPTION
  | MAX_QUERIES_PER_HOUR count
  | MAX_UPDATES_PER_HOUR count
  | MAX_CONNECTIONS_PER_HOUR count
  | MAX_USER_CONNECTIONS count

[링크 : http://dev.mysql.com/doc/refman/5.1/en/grant.html

'프로그램 사용 > mysql & mariaDB' 카테고리의 다른 글

mysql / mariaDB  (1) 2014.04.16
mysql transaction  (0) 2014.04.08
mysql 암호변경하기  (0) 2013.02.21
mysql 명령어 정리  (0) 2012.12.01
mysql 사용법(SQL)  (4) 2010.04.03
Posted by 구차니
프로그램 사용/meld2014. 3. 31. 23:57
로케일 문제로 생각 되는데..

[링크 : https://code.google.com/p/meld-installer/issues/detail?id=42]



환경설정의 폰트는 영향을 주지 않았고


커맨드 라인에서 

C:\> set LANG=EN_US
C:\> cd C:\Program Files (x86)\Meld\meld
C:\Program Files (x86)\Meld\meld> meld 
하니 문제없이 내용이 잘 나온다.


'프로그램 사용 > meld' 카테고리의 다른 글

meld for windows  (0) 2014.03.31
meld 에서 문법강조 켜기(syntax highlighter on Meld)  (0) 2011.10.15
meld - GUI merge tool for linux  (0) 2009.04.06
GUI diff tool - meld  (6) 2009.02.13
Posted by 구차니
프로그램 사용/meld2014. 3. 31. 22:07
google code에서 하다가 sourceforge로 옮겨진 듯

meld는 아쉽게도 winmerge 처럼
파일이 아닌 ctrl-c,v로 즉석에 비교할 수는 없다.


Blank comparison 을 누른후


Files are identical 이라는 곳 아래에 커서쪽에 붙여 넣으면 비교가 가능하다!!


[링크 : http://sourceforge.net/projects/meld-installer/]
Posted by 구차니
Programming/jsp2014. 3. 31. 20:49
자바빈에 대한 전반적인건 아니고.. 
jsp 액션 태그로서의
jsp:useBean은 사용법이 간단한 편이다.

DTO(Data Transfer Object) 라고도 표현하며
form의 변수명과 bean에 접속할 클래스의 변수명이 동일할 경우 

을 통해 변수 수 만큼 불러오고 지정하는 수고를 덜 수 있는 장점이 있다.
<jsp:getProperty name="beanName" property="*"/> 

물론 class 파일에서는 변수명과 동일한
public void setVarname(vartype varname)
public vartype getVarname() 
두개의 쌍으로 이루어진 수 많은 함수들을 생성해야 하는 단점이 존재한다. 



'Programming > jsp' 카테고리의 다른 글

jsp jdbc 기본 코드  (0) 2014.04.01
jdbc URL 구조  (0) 2014.04.01
jsp cookie  (0) 2014.03.31
jsp 액션 태그 - <jsp:  (0) 2014.03.28
jsp error 페이지 사이즈 제한(IE)  (0) 2014.03.27
Posted by 구차니
Programming/jsp2014. 3. 31. 20:48
쿠키는 로그인 정보나 장바구니 등에 사용되는
데이터를 클라이언트에 저장하는 기술이다.

[링크 : http://en.wikipedia.org/wiki/HTTP_cookie]

기본적으로 쿠키는 보안에 취약한 단점이 있어 주의해서 사용해야 하며
이를 보완하기 위해 도메인과 경로를 이용하여 접근을 막는 방법이 존재한다.
하지만 클라이언트 쿠키 저장소에 직접 접근을 막을수는 없으니 이래저래 보안이 취약하긴 매한가지.
void setDomain(String domain)
Specifies the domain within which this cookie should be presented.

void setPath(String uri)
Specifies a path for the cookie to which the client should return the cookie. 

jsp에서는 Cookie 클래스를 통해 쿠키를 생성하며
클라이언트에 저장된 쿠키를 서버에서 접근이 가능해지는 구조이다.

쿠키는 한글입력 불가하나 일일이 인코딩해서 사용하면 가능하다.
URLEncoder.encode("한글","euc-kr")
URLDecoder.decode(cookie.getValue(), "euc-kr") 
 
 
쿠키는 보안을 위해 유효시간을 지니며
setMaxAge를 통해 파기 할때 까지의 시간을 초 단위로 지정할 수 있다.
0으로 설정시에는 0초후 파기되므로, 쿠키를 파기하는데 주로 사용된다.
setMaxAge
public void setMaxAge(int expiry)
Sets the maximum age in seconds for this Cookie.
A positive value indicates that the cookie will expire after that many seconds have passed. Note that the value is the maximum age when the cookie will expire, not the cookie's current age.

A negative value means that the cookie is not stored persistently and will be deleted when the Web browser exits. A zero value causes the cookie to be deleted.

Parameters:
expiry - an integer specifying the maximum age of the cookie in seconds; if negative, means the cookie is not stored; if zero, deletes the cookie


+ 2014.04.02 추가
setPath() 메소드는 절대경로로 먹는 느낌
webContent가 존재하는 최상위 경로로 부터 전체 경로를 적어야 한다.
그게.. "쿠키의 경로는 쿠키를 설정하는 서브릿을 포함해야 한다"의 의미이려나?
게다가 이클립스의 경우 프로젝트 명으로 폴더를 하나더 들어가기에
/프로젝트명/폴더 식으로 점점 더 길어진다. -_-a
request.getContextPath() 를 추가해주는게 좋을지도..

setPath

public void setPath(java.lang.String uri)
Specifies a path for the cookie to which the client should return the cookie.

The cookie is visible to all the pages in the directory you specify, and all the pages in that directory's subdirectories. A cookie's path must include the servlet that set the cookie, for example, /catalog, which makes the cookie visible to all directories on the server under /catalog.

Consult RFC 2109 (available on the Internet) for more information on setting path names for cookies.

Parameters:
uri - a String specifying a path
See Also:
getPath() 

'Programming > jsp' 카테고리의 다른 글

jdbc URL 구조  (0) 2014.04.01
jsp action tag / <jsp:useBean  (0) 2014.03.31
jsp 액션 태그 - <jsp:  (0) 2014.03.28
jsp error 페이지 사이즈 제한(IE)  (0) 2014.03.27
jsp buffer  (0) 2014.03.27
Posted by 구차니
개소리 왈왈/자전거2014. 3. 30. 19:19
1년 만에 3200km 타고
팔았던 사람에게 다시 되팔기 시전?! ㅋㅋㅋ

나름 풀 카본에서
알루로 다운그레이드 되었고

470에서 490으로 사이즈도 커지는 바람에 걱정이 되었지만
골골대는 상황에서도 나름 잘나가주고
클린처와 알루미늄의 안정감(?)으로 전보다 안락하고
라쳇소리가 안나니
마치 스포츠카를 타다가 중후한 세단으로 갈아탄 느낌 이랄까?





아무튼.. 2013년 3월 24일 인수 받았고
1년간 3000km를 탔으니 나름 본전을 잘 뽑은듯? 


올해는 시즌온을 했어야 하나... 수영과 피로로 인해서 봉인중 ㅠㅠ


Posted by 구차니
2는 머랄까.. 1처럼 닥돌이 아니라 좀 은폐하고
죽여야 하는 몹이 있어서 짜증난다 ㅠㅠ

그나저나 이제 첫 행성도 못 끝낸건데 하...
까마득 하구나 ㅠㅠ

현재 챕터는 M'digbo의 Ursul Gardens



[링크 : http://serioussam.wikia.com/wiki/Ursul_Gardens ]
Posted by 구차니
개소리 왈왈/블로그2014. 3. 29. 23:19
광고하나 달고 무료로 쓰면되지 싶지마는
블로그 운영 철칙이 무료운용/무투자 이기 때문에(도메인 제외)
dnsever에 대한 광고를 달거 무료로 쓰진 않아야 하는 딜레마(?)
아무튼 유료로 쓰거나 조금 불편해도
woobi로 돌아가서 설정을 하는 한이 있더라도 무료를 고수하련다 ㅋㅋㅋ



[링크 : https://kr.dnsever.com/start.html?user_domain=&selected_menu=supporters]
Posted by 구차니