본문 바로가기

전체 글

RMI 호출 메커니즘 1. RMI Server에서 원격객체를 생성한다. 이때, RMI 런타임의 내부적인 메커니즘에 의해서 스텁과 스켈레톤 객체가 생성된다. 생성된 스텁 객체는 RMI 원격 객체에 대한 위치 정보(IP, port)와 객체 식별자 정보등을 포함한다. public HelloImpl() throws RemoteException { super(); } *super()는 내부적으로 exportObject() 메소드를 호출하여 Export한다. Export는 원격 메소드 호출을 위한 준비과정이며 이 과정에서 Stub과 Skeleton이 생성된다. 2. RMI Server는 rmiregistry에 RMI 원격 객체를 약속된 이름으로 등록한다. 이때, rmiregistry에 등록되는 객체는 내부적인 메커니즘에 의해서 원격객체.. 더보기
자바스크립트 배열 add number 자바스크립트에서 배열의 길이는 고정 되어있지 않고 자바의 클래스 java.util.ArrayList 나 java.util.Vector와 비슷하게 동작한다. 즉, 동적으로 배열의 길이를 늘릴 수 있다. 배열의 인덱스에 배열의 길이(해당 배열의 마지막 인텍스값 + 1)를 통해서 값을 넣을 수 있고 계속적으로 배열의 길이는 늘어난다. 위 코드를 참조하고 실행해보면 쉽게 이해할 수 있을 것이다. 더보기
부호 영어 이름 부호(symbol), 영어이름(English name), 별칭(Another name) ~ Tilde ` Open single quoto , Single quotation ! Exclamation point @ At sign # Sharp , Double cross , Number $ Dollar sign , String % Percent ^ Caret Exponentiation & Ampersand , And * Asterisk , Multiplication ( Open parenthesis ) Close parenthesis _ Under score , Under line - Minus sign , Hyphen , Subtraction , Negative + Plus sign , Cross Addit.. 더보기
Javascript this keyword The this keyword One of the most powerful JavaScript keywords is this. Unfortunately it is hard to use if you don't exactly know how it works. Below I explain how to use it in event handling. Later on I'll add some information about other uses of this. Owner The question that we'll discuss for the remainder of the page is: What does this refer to in the function doSomething()? function doSomethi.. 더보기
java.io의 상속도 참고) java.lang.System의 정적 필드 타입 err - java.io.PrintStream in - java.io.InputStream out - java.io.PrintStream 더보기
Tomcat에 Web Context 추가하기 Tomcat 환경변수 설정 CATALINA_HOME C:\Tomcat 5.5 CLASS_PATH .;%CATALINA_HOME%\common\lib\servlet-api.jar Path %CATALINA_HOME%\bin Web Context 추가하기 5.X 버전 예)C:\home 디렉토리를 서비스 %CATALINA_HOME%\conf\Catalina\localhost 폴더에 home.xml을 생성. home.xml *reloadable="true" 자바,서블릿 등을 컴파일 후 Tomcat을 다시 시작하지 않고 변경된 내용 적용 가능. root폴더의 내용을 C:\home에 복사 C:\home\WEB-INF\web.xml org.apache.jsp.index_jsp /index.jsp /index.jsp .. 더보기
synchronized(this)와 synchronized(.class)의 차이점 import java.io.*; public class SynchronizedEx01 extends Thread { static int count; public void run() { for (int i=0; i 더보기
정규표현식 - HTML에서 링크 뽑아내기 태그의 대소문자 구분은 하지 않으므로 대소문자를 모두 지원하기 위해서는String.toLowerCase(str)를 먼저 사용해야 한다. import java.util.regex.Matcher; import java.util.regex.Pattern; public class RegularExpressionEx01 { public static void main(String[] args) { String str = ""; String regEx = "|^\\s]+)(?:\"|\'|\\s)?[^>]*>"; Pattern pattern = Pattern.compile(regEx); Matcher match = pattern.matcher(str); if(match.find()) { System.out.printl.. 더보기