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

📄 handler.jsp

📁 Heritrix是一个开源,可扩展的web爬虫项目。Heritrix设计成严格按照robots.txt文件的排除指示和META robots标签。
💻 JSP
字号:
<%@ page import="org.archive.crawler.admin.CrawlJobHandler, org.archive.crawler.Heritrix" %><%    /**     * This include page ensures that the handler exists and is ready to be     * accessed.     */    CrawlJobHandler handler =        (CrawlJobHandler)application.getAttribute("handler");    Heritrix heritrix = (Heritrix)application.getAttribute("heritrix");        // If handler is empty then this is the first time this bit of code is    // being run since the server came online. In that case get or create the    // handler.    if (handler == null) {        if(Heritrix.isSingleInstance()) {            heritrix = Heritrix.getSingleInstance();            handler = heritrix.getJobHandler();            application.setAttribute("heritrix", heritrix);            application.setAttribute("handler", handler);        } else {            // TODO:            // If we get here, then there are multiple heritrix instances            // and we have to put up a screen allowing the user choose between.            // Otherwise, there is no Heritrix instance.  Thats a problem.            throw new RuntimeException("No heritrix instance (or multiple " +                    "to choose from and we haven't implemented this yet)");        }    }%>

⌨️ 快捷键说明

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