|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--javax.servlet.GenericServlet
|
+--javax.servlet.http.HttpServlet
|
+--CoolSearch
The servlet class. The manager.html will post to this servlet and the search.html will get from this servlet so that we can distinguish between two request.
| Field Summary | |
private static WebIndex |
w
The Index that store keywords-pages. |
| Fields inherited from class javax.servlet.http.HttpServlet |
|
| Fields inherited from class javax.servlet.GenericServlet |
|
| Constructor Summary | |
CoolSearch()
|
|
| Method Summary | |
private void |
clearup()
clear up the web index |
private void |
crawl(int numCrawl,
java.lang.String url,
WebIndex w,
java.lang.String filename)
Crawl the web!! |
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
the get method that response to the search.html |
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
the post method that response to manager.html |
private void |
restore(java.lang.String filename)
restore the webindex from file |
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static WebIndex w
| Constructor Detail |
public CoolSearch()
| Method Detail |
protected void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
doPost in class javax.servlet.http.HttpServletjavax.servlet.ServletException
java.io.IOException
protected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletException
java.io.IOException
private void crawl(int numCrawl,
java.lang.String url,
WebIndex w,
java.lang.String filename)
throws java.lang.Exception
java.lang.Exception
private void restore(java.lang.String filename)
throws java.io.IOException
java.io.IOExceptionprivate void clearup()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||