一、从官网下载
heritrix-3.1.2-20130802.033935-177-dist.zip
heritrix-3.1.2-20130802.033935-177-src.zip
二、在eclipse建立一个新的web项目
将heritrix-3.1.2-20130802.033935-177-dist.zip的heritrix-3.1.2-SNAPSHOT\lib的jar复制到WEB-INF的目录下面
将heritrix-3.1.2-20130802.033935-177-src.zip 的heritrix-3.1.2-SNAPSHOT\commons\src\main\java目录(对应heritrix-commons-3.1.0.jar), heritrix-3.1.2-SNAPSHOT\modules\src\main\java目录(对应heritrix-modules-3.1.0.jar)和 heritrix-3.1.2-SNAPSHOT\engine\src\main\java(对应heritrix-engine-3.1.0.jar)。这样你就可以删除heritrix-commons-3.1.0.jar,heritrix-engine-3.1.0.jar,heritrix-modules-3.1.0.jar三个包的引用,直接使用源代码运行。
三、
Heritrix.java的 String authPassword = null; 改为 String authPassword = "admin";
将run configurations 的 program argument设置参数 -a admin:admin
下图的start 是正在运行才有的,别
误解!!!!!
ctrl+F9运行这个main()程序,再
开启tomcat start!
四、网址输入
https://localhost:8443/
若输入http://localhost:8443/
就出现SSL
错误
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at sun.security.ssl.InputRecord.handleUnknownRecord(InputRecord.java:671)
at sun.security.ssl.InputRecord.read(InputRecord.java:504)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:927)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1339)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1323)
at org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:708)
at org.mortbay.
thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
2013-08-03 13:28:20.837:WARN::EXCEPTION
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:946)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1339)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1323)
at org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:708)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
- class='magplus' title='点击查看原始大小图片' />
- 大小: 35.8 KB