Cosminexus システム運用ガイド
あらかじめJ2EEアプリケーションやバッチアプリケーションでユーザログを取得するための実装をしておくと,次の情報がユーザログに出力されます。
ここでは,J2EEアプリケーションのユーザログの実装例および出力例を示します。
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import com.hitachi.software.ejb.application.prf.CprfTrace; (中略) public void doGet (HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { HttpSession ses = req.getSession(); String sessionID = (ses != null) ? ses.getId() : null; // セッションIDを取得 String rootAPInfo = CprfTrace.getRootApInfo(); // ルートアプリケーション情報を取得 String userID = req.getRemoteUser(); // J2EEアプリケーションのログイン名を取得 ユーザログ出力メソッド(sessionID,rootAPInfo,userID); : |
All Rights Reserved. Copyright (C) 2006, 2007, Hitachi, Ltd.