没有做过,也不太了解,只是知道网上的如google,就是说几台服务器发出N个爬虫程序整天在网上抓网页回来,然后在数据库中分类存储...
解决方案 »
- Spring映射hbm.xml
- getCurrentSession() 的怪现象 求助
- 哪位大侠使用过XTree啊?可否借例子看看啊?万分感激!20分相送!
- 控件挡住菜单
- 是否能够在IIS上运行JSP网站呢?
- 我的机器对同一网页不自动更新,怎么办?谢谢!
- 终于找到这本书的电子版啦,和csdn里的兄弟姐妹们共享~~~~~~~~~~
- 到底是 数据源(data source) 还是 连接池(connection pool) ???
- 心灵的宁静
- resin不能启动
- SERVLET+JSP模式中,我想实例一个自定义的对象,并在应用服务启动时,把它放到全局区
- 请大家帮个忙 去Http://www.numbertide.com(去了的,报个名,就接分)
import javax.servlet.*;
import javax.servlet.http.*;
import java.net.*;
public class SearchEngines extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
String searchString = request.getParameter("searchString");
if ((searchString == null) ||
(searchString.length() == 0)) {
reportProblem(response, "Missing search string.");
return;
}
// The URLEncoder changes spaces to "+" signs and other
// non-alphanumeric characters to "%XY", where XY is the
// hex value of the ASCII (or ISO Latin-1) character.
// Browsers always URL-encode form values, so the
// getParameter method decodes automatically. But since
// we're just passing this on to another server, we need to
// re-encode it.
searchString = URLEncoder.encode(searchString);
String numResults = request.getParameter("numResults");
if ((numResults == null) ||
(numResults.equals("0")) ||
(numResults.length() == 0)) {
numResults = "10";
}
String searchEngine =
request.getParameter("searchEngine");
if (searchEngine == null) {
reportProblem(response, "Missing search engine name.");
return;
}
SearchSpec[] commonSpecs = SearchSpec.getCommonSpecs();
for(int i=0; i<commonSpecs.length; i++) {
SearchSpec searchSpec = commonSpecs[i];
if (searchSpec.getName().equals(searchEngine)) {
String url =
searchSpec.makeURL(searchString, numResults);
response.sendRedirect(url);
return;
}
}
reportProblem(response, "Unrecognized search engine.");
} private void reportProblem(HttpServletResponse response,
String message)
throws IOException {
response.sendError(response.SC_NOT_FOUND,
"<H2>" + message + "</H2>");
}
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
doGet(request, response);
}
}
http://jakarta.apache.org/lucene/docs/index.html主页上的说明:
Jakarta Lucene is a high-performance, full-featured text search engine written entirely in Java. It is a technology suitable for nearly any application that requires full-text search, especially cross-platform是全文的
upupuupupp
upupupupupupupupupupupupupupupupupupupup
upupupupupupupupupvv upupupup
what?what?what? what?what?what?what?what?
what?vwhat?what?what?
vvvwhat?
what?what?what?what?
up
upupupup
up
upup
up
找不到......."请回答 谢谢 谢谢 谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢
ding
ding
ding
ding