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

📄 action.jsp

📁 Heritrix是一个开源,可扩展的web爬虫项目。Heritrix设计成严格按照robots.txt文件的排除指示和META robots标签。
💻 JSP
字号:
<%@ page errorPage="/error.jsp" %><%@include file="/include/handler.jsp"%><%    /**     * This webpage performs actions that can be performed from the console.     */    String sAction = request.getParameter("action");    if(sAction != null)    {        // Need to handle an action            if(sAction.equalsIgnoreCase("start"))        {            // Tell handler to start crawl job            handler.startCrawler();        } else if(sAction.equalsIgnoreCase("stop")) {            // Tell handler to stop crawl job            handler.stopCrawler();        } else if(sAction.equalsIgnoreCase("terminate")) {            // Delete current job            if(handler.getCurrentJob()!=null){                handler.deleteJob(handler.getCurrentJob().getUID());            }        } else if(sAction.equalsIgnoreCase("pause")) {            // Tell handler to pause crawl job            handler.pauseJob();        } else if(sAction.equalsIgnoreCase("resume")) {            // Tell handler to resume crawl job            handler.resumeJob();        } else if(sAction.equalsIgnoreCase("checkpoint")) {            if(handler.getCurrentJob() != null) {                handler.checkpointJob();            }        }    }        response.sendRedirect(request.getContextPath() + "/index.jsp");%>

⌨️ 快捷键说明

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