<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>群英汇博客 &#187; java</title> <atom:link href="http://blog.ossxp.com/tag/java/feed/" rel="self" type="application/rss+xml" /><link>http://blog.ossxp.com</link> <description></description> <lastBuildDate>Wed, 14 Sep 2011 03:52:03 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.2</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Nutch 深度的测试</title><link>http://blog.ossxp.com/2010/03/869/</link> <comments>http://blog.ossxp.com/2010/03/869/#comments</comments> <pubDate>Fri, 19 Mar 2010 01:34:17 +0000</pubDate> <dc:creator>崔 锐</dc:creator> <category><![CDATA[技术文章]]></category> <category><![CDATA[搜索引擎]]></category> <category><![CDATA[未分类]]></category> <category><![CDATA[java]]></category> <category><![CDATA[nutch]]></category><guid
isPermaLink="false">http://blog.ossxp.com/?p=869</guid> <description><![CDATA[
今天下午我做了一个Nutch深度的测试。先在apache2下建立一个小网站,这个网站用Git作版本控制工具，它只有5个网页，分别是a.html,b.html,c.html,d.html,index.html。它们的链接关系index.html中有a.html,a.html有b.html,依次类推。这五个网页分别有各自的特殊字符页面
特殊字符index.html
首页a.html
三国演义b.html
西游记c.html
群英汇d.html
红楼梦这期间发生一个小插曲，我开始用nutch爬起这个小网站，结果什么都搜不到。我反复折腾，最后总算对比其他网页才知道错在哪。原因就是开始我图简单就少写了meta标签，所以总是搜不到。看来下一次要好好研究研究nutch的字符编码问题:
&#60;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&#62;下面正式开始测试，先写个Rakefile,这样就可以简化操作:
depth=1
task:default =&#62; [:search]
task:crawl do
sh "bin/nutch crawl myurl -dir crawl/ -depth #{depth} -threads 10"
end
task:search =&#62; [:crawl] do
sh 'rm -rf ../crawl'
sh 'mv crawl ../'
sh 'sudo /etc/init.d/tomcat6 restart'
end修改depth的值，依次从1－5，分别执行rake，搜诉网页上的特殊字符结果如下:depth
首页
三国演义
西游记
群英汇
红楼梦1
可以2
可以
可以3
可以
可以
可以4
可以
可以
可以
可以5
可以
可以
可以
可以
可以nutch的深度是依据链接的，这样设计的爬虫容易控制。]]></description> <wfw:commentRss>http://blog.ossxp.com/2010/03/869/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>用Debian/Ubuntu提供的软件包整合apache2和tomcat6</title><link>http://blog.ossxp.com/2010/01/312/</link> <comments>http://blog.ossxp.com/2010/01/312/#comments</comments> <pubDate>Wed, 20 Jan 2010 13:57:01 +0000</pubDate> <dc:creator>王胜</dc:creator> <category><![CDATA[Java＆J2EE]]></category> <category><![CDATA[Apache]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[java]]></category> <category><![CDATA[Tomcat]]></category><guid
isPermaLink="false">http://blog.ossxp.com/?p=312</guid> <description><![CDATA[上篇日志写了用下载源码包的方式整合apache2和tomcat6，或许你会问：怎么不用Debian自己提供的软件包整合呢？
其实在我用下载源码包的方式成功整合apache2和tomcat6后，我就开始实验用Debian自己提供的软件包整合，可是摸索了好长时间，还是整合不成功 :-?  。今天在同事蒋鑫的帮助下，终于有了眉目 :-) 。下面是具体步骤：
1、安装 tomcat6
sudo aptitude  install tomcat6 tomcat6-docs tomcat6-admin tomcat6-examples
2、安装 apache2
sudo aptitude install apache2
3、安装apache-tomcat 连接器模组 libapache2-mod-jk
sudo aptitude install libapache2-mod-jk
4、配置jk
cd /etc/apache2/mods-available
/etc/apache2/mods-available$ sudo vi jk.conf
jk.conf的内内容如下
# 指出jk模块工作所需要的工作文件workers.properties的位置
JkWorkersFile /etc/libapache2-mod-jk/workers.properties# Where to put jk logs
JkLogFile /var/log/apache2/mod_jk.log# Set the jk log level [debug/error/info]
JkLogLevel info# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"# JkOptions indicate to send SSL <a
href="http://blog.ossxp.com/2010/01/312/" class="more-link">阅读全部内容 &#187;</a>]]></description> <wfw:commentRss>http://blog.ossxp.com/2010/01/312/feed/</wfw:commentRss> <slash:comments>18</slash:comments> </item> <item><title>Linux下Apache与Tomcat的整合</title><link>http://blog.ossxp.com/2010/01/296/</link> <comments>http://blog.ossxp.com/2010/01/296/#comments</comments> <pubDate>Tue, 19 Jan 2010 03:42:07 +0000</pubDate> <dc:creator>王胜</dc:creator> <category><![CDATA[Java＆J2EE]]></category> <category><![CDATA[Apache]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[java]]></category> <category><![CDATA[Tomcat]]></category><guid
isPermaLink="false">http://blog.ossxp.com/?p=296</guid> <description><![CDATA[背景介绍：
Apache的HTTPD是目前比较受欢迎的网站服务器软件，它不但功能强大，而且完全免费，并且支持市场上流行的各种操作系统(Windows,Linux,Mac os)。同时对于Java Servlet/JSP的支持，通常也会使用同样Apache出品的Tomcat。Tomcat除了支持Java Servlet/JSP之外，也可以当做网站服务器使用，但是在对于静态的html文件、图片文件等的解析效率上不如Apache HTTPD的执行效率高。应用tomcat的服务器如果网站的访问量较大，系统资源占用会明显升高。所以就引出Tomcat与apache的整合服务。Apache负责静态资源处理，tomcat负责jsp和java servlet等动态资源的处理。
需要的组件：
1、apache
下载地址：http://httpd.apache.org/download.cgi
2、Tomcat
下载地址：http://tomcat.apache.org/download-60.cgi
3、Apache Tomcat Connector (mod_jk)
下载地址：http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/
根据你的操作系统选择适当的 jk 连接器，同时要注意你用的Apache版本，根据你的Apache版本下载合适的jk版本。
下面是apache与jk的兼容性映射mod_jk-1.2.28-httpd-2.2.X.so is for Apache 2.2.x. It has been build against version 2.2.6, but should work with Apache 2.2.0 and later. Rename to mod_jk.so before putting it in your modules directory or adjust your LoadModule statement.
mod_jk-1.2.28-httpd-2.0.X.so is for Apache 2.0.x. It has been build <a
href="http://blog.ossxp.com/2010/01/296/" class="more-link">阅读全部内容 &#187;</a>]]></description> <wfw:commentRss>http://blog.ossxp.com/2010/01/296/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>velocity 未列入文档的秘密</title><link>http://blog.ossxp.com/2010/01/192/</link> <comments>http://blog.ossxp.com/2010/01/192/#comments</comments> <pubDate>Wed, 13 Jan 2010 13:06:54 +0000</pubDate> <dc:creator>崔 锐</dc:creator> <category><![CDATA[技术文章]]></category> <category><![CDATA[持续集成]]></category> <category><![CDATA[CruiseControl]]></category> <category><![CDATA[java]]></category> <category><![CDATA[Velocity]]></category><guid
isPermaLink="false">http://blog.ossxp.com/?p=192</guid> <description><![CDATA[Velocity小技巧
今天，在Velocity模板对i18n字符串进行处理，需要转换小写和将空格替换为下划线。一般情况下，从java代码中通过Context传递是最简单的，但是有的情况，不现实。在CC的模板中，就有这样的情况
下面是一个在模板中实现字符串转换的具体例子：#set( $tab_title = "#springMessage('Build.Log')" )
&#60;div id="$tab_title.toLowerCase().replace(' ', '_')" class="widget"
$log_extra_attrs&#62;
&#60;h2&#62;$tab_title&#60;/h2&#62;
&#60;span class="logfile"&#62;&#60;a
href="$req.getContextPath()/tab/build/download/log/$projectName/$logfile"&#62;#springMessage('Download.log')
&#60;/a&#62;&#60;/span&#62;
&#60;/div&#62;Velocity
Velocity是基于Java的模板引擎。它允许Web页面开发者引用Java代码中定义的方法。Web设计者可以和Java程序开发者并行开发遵循MVC模式的Web站点。这意味着，Web设计者可以将精力放在好的Web站点设计上，而Java程序开发者可以将精力放在编写代码上。Velocity将Java代码从Web页面中分离，使Web站点更具长期可维护性，并提供了一种替代JSP或PHP的方案
如果有感兴趣的可以看看 Velocity英文文档 .]]></description> <wfw:commentRss>http://blog.ossxp.com/2010/01/192/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 2/15 queries in 0.005 seconds using disk

Served from: blog.ossxp.com @ 2012-02-09 16:40:59 -->
