?? mvnforumcontextlistener.java
字號(hào):
package com.mvnforum;
import javax.servlet.*;
import org.apache.commons.logging.*;
import net.myvietnam.mvncore.util.FileUtil;
public class MVNForumContextListener implements ServletContextListener {
private static Log log = LogFactory.getLog(MVNForumContextListener.class);
/**
* The servlet context with which we are associated.
*/
private ServletContext context = null;
public MVNForumContextListener() {
}
/**
* Notification that the web application is ready to process requests.
*
* @param event ServletContextEvent
*/
public void contextInitialized(ServletContextEvent event) {
log.debug("contextInitialized");
this.context = event.getServletContext();
String realPath = context.getRealPath("/WEB-INF/classes");// Add '/' before WEB-INF to fix the Oracle 10G bug
FileUtil.setServletClassesPath(realPath);
}
/**
* Notification that the servlet context is about to be shut down.
*
* @param event ServletContextEvent
*/
public void contextDestroyed(ServletContextEvent event) {
log.debug("contextDestroyed");
this.context = null;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -