Class Search

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--Search

public class Search
extends javax.servlet.http.HttpServlet

A search servlet demo It supports AND and OR query, but it does not return a detailed summary. This demo is suitable for the limited hosts or recursive depth since it maintains its list of URLs and keywords in memory. This search engine demo is not suitable for indexing a large number of URLs since it holds the information of URLs and keywords in memory. If you wish to do so, you should seek the relative information of the specific keyword (or URL) in the index database through JDBC interface, not in memory through hash tables. I've included the retrieval reports for http://www.mokabyte.it and file:///d:/article/firewallutil/ with a recursive depth of 3. Some query samples are also provided in HTML format.

See Also:
Serialized Form

Constructor Summary
Search()
           
 
Method Summary
 void destroy()
           
 java.lang.String getServletInfo()
           
 void init(javax.servlet.ServletConfig servletConfig)
          Initialize JDBC driver and url parameters It need a JDBC 2.0 driver which supports the scrollable updatable resultset.
 void service(javax.servlet.http.HttpServletRequest requestp, javax.servlet.http.HttpServletResponse response)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Search

public Search()
Method Detail

getServletInfo

public java.lang.String getServletInfo()
Overrides:
getServletInfo in class javax.servlet.GenericServlet

init

public void init(javax.servlet.ServletConfig servletConfig)
Initialize JDBC driver and url parameters It need a JDBC 2.0 driver which supports the scrollable updatable resultset. Some serializable objects will be holden in some OBJECT or VARBINARY columns. The default demo driver is DBF JDBC driver Search.initparams=driver=zyh.sql.dbf.DBFDriver,jdbcurl=jdbc:DBF:/.
Overrides:
init in class javax.servlet.GenericServlet

destroy

public void destroy()
Overrides:
destroy in class javax.servlet.GenericServlet

service

public void service(javax.servlet.http.HttpServletRequest requestp,
                    javax.servlet.http.HttpServletResponse response)
             throws javax.servlet.ServletException,
                    java.io.IOException
Overrides:
service in class javax.servlet.http.HttpServlet