Java 설정 파일로 많이 쓰이는 Properties 사용법
String openProp = request.getRealPath("/taesuz/") + "/taesuz.properties"; try{ Properties props = new Properties(); props.load( new FileInputStream( openProp )); props.setProperty("type", type ); FileOutputStream fos = new FileOutputStream( openProp ); props.save(fos, "open type change"); out.println( "open type change: " + type ); } catch (IOException ioe){ out.println( ioe ); } catch (Exception e){ out.println( e ); }
'프로그래밍 > Java' 카테고리의 다른 글
맥에서 jdeveloper 설치하기 (1) | 2010.03.17 |
---|---|
log4sql Query 의 대한 모든것을 보여준다. (1) | 2009.09.08 |
[펌] 자바(Java)라... 그 역겨움이란... (0) | 2007.12.14 |
JDOM 프로그래밍.. (1) | 2007.12.06 |
com.oreilly.servlet (0) | 2007.10.27 |