⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 log4jservlet.java

📁 该程序能够准确的记录互联网用户上网所用的流量
💻 JAVA
字号:
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);	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -