본문 바로가기

tomcat 실행시 servlet class 중복 실행 오류(?) 안녕하세요 ~/www/WEB-INF/web.xml 에 loadtest loadTest.LoadTest 1 이렇게 해 놓고 테스트용 servlet 프로그램을 만들어서 public void init(ServletConfig config) throws ServletException { super.init(config); System.out.println("LoadTest class upload"); } 위와 같이 코드를 작성했을 때 $ tail ../logs/catalina.out 2010. 9. 12 오전 1:14:58 org.apache.catalina.core.StandardEngine start 정보: Starting Servlet Engine: Apache Tomcat/6.0.18 LoadTest c.. 더보기
shell programming - 2 [nov07@uj64-003 EXE]$ cat klt.sh #!/bin/sh olddir=`pwd` rundir=~/www/tt0006/analyze/klt/EXE outfile=$rundir/temp.out infile=$rundir/temp.in exefile=$rundir/indexU cd $rundir if [ -e "$outfile" ] ; then rm $outfile fi $exefile $infile $outfile cd $olddir 신기한 쉘 프로그래밍의 세계 더보기
shell programming #!/bin/sh outfile=temp.out infile=temp.in if [ -e "$outfile" ] ; then rm $outfile fi ./indexU $infile $outfile 위에꺼랑---------------------------------------------------- #!/bin/sh outfile=temp.out infile=temp.in if [ -e "$outfile" ] ; then exec "rm" "$outfile" fi exec "./indexU" "$infile" "$outfile" 아래꺼랑---------------------------------------------------- 차이점이 뭘까... 왜 아래꺼는 제대로 작동을 안 하는 걸까 쉘프로그래밍 e.. 더보기
java encoding UTF-8 문제 소스파일을 UTF-8로 작성하였을 경우, (BOM 이 있는 UTF-8 파일은 인식하지 못함) 컴파일은 javac -encoding UTF-8 Foo.java 실행은 java Foo BufferedWriter out = new BufferedWriter( new OutputStreamWriter( new FileOutputStream("out.txt"), "UTF8" )); out.write("출력"); out.newLine(); out.flush(); 이렇게 하면 된다는데,,, 파일 인코딩은 UTF-8로 잘되는데, 정작 안에 내용이 깨진다. 이클립스에서 하면 이런거 지정 안해도 잘 되는데 cmd창에서 하면 개그지발싸개같은... 하앜 ----------------------------------------.. 더보기
JAVA에서 2차원 배열 동적 할당하기 String str[][] = null; int x = 2; int y1 = 6; int y2 = 7; str = new String[x][]; str[0] = new String[y1]; str[1] = new String[y2]; for(int i=0;i 더보기