📄 mainservlet.java
字号:
/* @LICENSE_COPYRIGHT@ */
package net.sf.irunninglog.servlet;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts.action.ActionServlet;
/**
* Extension of the <code>org.apache.struts.action.ActionServlet</code>
* class used to handle any application-specific servlet logic. The initial
* implementation of this class simply provides additional logging, but may
* later provide additional functionality.
*
* @author <a href="mailto:allan_e_lewis@yahoo.com">Allan Lewis</a>
* @version $Revision: 1.2 $ $Date: 2005/06/25 15:18:20 $
* @since iRunningLog 1.0
*/
public class MainServlet extends ActionServlet {
/** <code>Log</code> instance for this class. */
private static final Log LOG = LogFactory.getLog(MainServlet.class);
/**
* Perform any work needed to initialize the servlet.
*
* @throws ServletException If a servlet exception is thrown
*/
public void init() throws ServletException {
LOG.info("iRunningLog MainServlet initialization...");
super.init();
LOG.info("iRunningLog MainServlet initialized");
}
/**
* Perform any work needed to destroy (clean up) the servlet.
*/
public void destroy() {
LOG.info("iRunningLog MainServlet destruction...");
super.destroy();
LOG.info("iRunningLog MainServlet destroyed");
}
/**
* Perform the standard request processing for this request, and create
* the corresponding response.
*
* @param request The servlet request we are processing
* @param response The servlet response we are creating
* @throws IOException If an input/output error occurs
* @throws ServletException If a servlet exception is thrown
*/
protected void process(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
if (LOG.isDebugEnabled()) {
LOG.debug("process: Main servlet processing the following request/"
+ "response - request=" + request + " response="
+ response);
}
super.process(request, response);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -