JSP 프리컴파일 DarkKaiser, 2007년 7월 1일2023년 9월 2일 프리컴파일(JSP 파일을 미리 컴파일)이라는 기능은 웹에서 HTTP를 이용해서 원하는 JSP 페이지에 대한 컴파일만을 처리할 수 있는 간단하면서도 강력한 방법이다. Hello.jsp?jsp_precompilation Hello.jsp?jsp_precompilation=true Hello.jsp?title=java&jsp_precompilation=true Continue Reading
데이터소스를 이용한 DB 사용 샘플 예제 DarkKaiser, 2007년 7월 1일2023년 9월 6일 <%@ page contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%<%@ page import="java.sql.*"%<%@ page import="javax.sql.*"%<%@ page import="javax.naming.*"%<title사용자자가 가지고 있는 모든 테이블 보기</title<h3<% Context ctx = null; DataSource ds = null; Connection con = null; Statement stmt = null; ResultSet rs = null; String sql = "select * from tab"; Continue Reading
자바빈즈 태그 설명 DarkKaiser, 2007년 7월 1일2023년 9월 6일 <jsp:useBean/> 태그 <jsp:useBean id=”자바빈 ID” class=”자바빈 클래스 이름” scope=”scope 영역 지정”/> /* 아래 두 문장은 같은 의미이다. */ <jsp:useBean id="customer" class="mybean.customer.CustomerBean"/> mybean.customer.CustomerBean = new mybean.customer.CustomerBean(); 만약 자바빈 클래스 파일을 불러오면서 초기화할 내용이 있다면 <jsp:useBean/>을 시작 태그와 종료 태그 형태로 쓴 다음 가운데 초기화할 내용을 적어주면 됩니다. <jsp:useBean> ... 초기화할 내용 Continue Reading
웹로직에서 JSP 파일의 컴파일 결과가 저장되는 폴더 DarkKaiser, 2007년 7월 1일2023년 9월 4일 서버 이름이 myserver이고 웹 애플리케이션 모듈의 이름이 study라고 할 때, JSP 파일이 컴파일 된 클래스 파일이 위치하는 곳은 \mydomain\myserver\.wlnotdelete\extract\myserver_study_web\jsp_servlet\ 에 위치한다. 만약 JSP 파일의 중간 생성 파일(.java)을 얻고자 할 경우에는 웹로직에서 설정을 잡아주어야 한다.해당 웹 애플리케이션 모듈을 선택하고 나서 구성>디스크립터 페이지에서 아래 JSP 생성 유지의 체크박스를 체크하면 중간 생성 Continue Reading
Adding Most Recently Used(MRU)FilestoanSDI/MDI Application DarkKaiser, 2007년 7월 1일2023년 9월 6일 Adding MRU to MFC SDI or MDI is actually not very difficult. I just add ?AddToRecentFileList(LPCTSTR lpszPathName) to ?CDocument derived class which calls the add the path name to ?CWinApp’s ?CRecentFileList (m_pRecentFileList). I use SDI for this demo. 1. Iinclude afxadv.h to stdafx.h. This contains the Continue Reading
프로젝트에 WindowsXP 테마 스타일 적용하기 DarkKaiser, 2007년 7월 1일2023년 9월 6일 윈XP의 화려한 UI를 사용해 보자. 아래를 따라해보자. 1. 우선 여러분의 프로젝트에서 리소스를 새로 추가한다. 이때 “Custom”을 선택하여 리소스 타입에 “24”라고 입력한다.2. 에디터에 아래의 XML 구문을 복사하여 붙여넣는다. <?xml version="1.0" encoding="UTF-8" standalone="yes"?<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"<assemblyIdentity processorArchitecture="x86" version="5.1.0.0" type="win32" name="test.exe"/<descriptionTest Application</description<dependency<dependentAssembly<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" Continue Reading
언어별 리소스 블럭 DarkKaiser, 2007년 7월 1일2023년 9월 4일 한글 리소스 블럭 ///////////////////////////////////////////////////////////////////////////// // Korean resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR) #ifdef _WIN32 LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT #pragma code_page(949) #endif //_WIN32 ... #endif 일본어 리소스 블럭 ///////////////////////////////////////////////////////////////////////////// // Japanese resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN) #ifdef _WIN32 LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT #pragma code_page(932) #endif //_WIN32 ... #endif 영어 리소스 블럭 ///////////////////////////////////////////////////////////////////////////// // English Continue Reading
서브클래싱 컨트롤에 마우스 Hover/Leave 구현 DarkKaiser, 2007년 7월 1일2023년 9월 4일 마우스 Hover, Leave를 구현하고자 하는 서브클래싱된 컨트롤의 헤더 파일에 아래의 두 함수를 추가하도록 한다. //{{AFX_MSG(CHoverButton) afx_msg LRESULT OnMouseLeave(WPARAM wparam, LPARAM lparam); afx_msg void OnMouseHover(WPARAM wparam, LPARAM lparam); //}}AFX_MSG 다음으로 소스파일의 메시지맵에 메시지에 대한 함수를 연결하도록 한다. BEGIN_MESSAGE_MAP(CHoverButton, CButton) ON_MESSAGE(WM_MOUSELEAVE, OnMouseLeave) ON_MESSAGE(WM_MOUSEHOVER, OnMouseHover) END_MESSAGE_MAP() 다음으로 실제 함수를 구현해주면 된다. void CHoverButton::OnMouseHover(WPARAM Continue Reading