CSIS 541 Project: Rev 2.0
- Created table for storing our keyword count.
- mysql>CREATE TABLE keyword_cnt(
url TEXT NOT NULL,
java INTEGER,
basic INTEGER,
begin INTEGER,
object INTEGER,
class INTEGER,
tutorial INTEGER,
encapsulation INTEGER,
hiding INTEGER,
modularity INTEGER,
abstraction INTEGER,
polymorphism INTEGER,
overloading INTEGER,
exception_handling INTEGER,
exception INTEGER,
packages INTEGER,
inheritance INTEGER,
class_hierachies INTEGER,
polymorphic_ref INTEGER,
applet INTEGER,
gui INTEGER.
abstract_class INTEGER,
interface INTEGER,
);
- Save these files in C:\jakarta-tomcat-5.0.19\webapps\searchengine
index.html searchengine.jsp
- Save this file in C:\jakarta-tomcat-5.0.19\webapps\searchengine\WEB-INF
web.xml
- Save these files in C:\jakarta-tomcat-5.0.19\webapps\searchengine\WEB-INF\classes\searchengine
SearchResultBean.java DataSourceBean.java
WordCounter.java
Don't forget to COMPILE the *.java files!
Program Description
- The program takes in as input a URL.
- It then checks to see if it is a valid URL.
- If invalid URL, error message is displayed and user can try again.
- If URL is valid, it will save the page to a text file named inputpage.txt.
(Stored in C:\jakarta-tomcat-5.0.19\bin).
- It then connects to the database and checks to see if URL is already in database.
- If URL already exists in database, goto 8.
- If URL does not exist in database, the program calls the WordConter program to count the keyword occurence on that page and saves the results into the database.
- It then extracts all the pages (URLS) stored in the database and displays them on the results page.