handler.jsp

来自「Heritrix是一个开源,可扩展的web爬虫项目。Heritrix设计成严格按」· JSP 代码 · 共 29 行

JSP
29
字号
<%@ 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 + =
减小字号Ctrl + -
显示快捷键?