?? log4jservlet.java
字號(hào):
package com.briup.common.servlet;import javax.servlet.ServletException;import javax.servlet.http.HttpServlet;import org.apache.log4j.PropertyConfigurator;public class Log4JServlet extends HttpServlet { public void init() throws ServletException { String path = getServletContext().getRealPath("/"); // getInitParameter("propfile")方法從web.xml文件中讀取Log4J配置文件的名字"profile"。 String propfile = path + getInitParameter("propfile"); PropertyConfigurator.configure(propfile); }}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -