back to intro
LitSearch: Web Application
The Web Application provides a front end to the database. It was written
using Java Servlets. To see what it
does, go to the LitSearch
Website. To see how it works, look at the source code below. Note
that the web application was coded to use the MySQL database. There are
a number of places where the code had to accommodate MySQL's lack of
functionality. Some examples are the numerous places where instead of
using subqueries, the query was performed, the relevant values were read
out of the result set and used to construct another statement.
- Admin.java
Administrator servlet -- handles adding and editing authors and reviews.
- AdvancedSearch.java
Advanced search servlet -- handles custom searches based on a number of
criteria and boolean operations.
- ConnectionWrapper.java
Keeps track of a connection, used in the connection pool.
- DatabaseHook.java
A very simplistic database connection pool.
- DescribeAuthor.java
Servlet which provides information on an author.
- DescribeWork.java
Servlet which provides information on a work.
- Front.java
Servlet which draws the front page. As you can see, most of the work is
done in LitsearchBase.
- KeywordSearch.java
Servlet which performst the simple keyword search
- ListOps.java
Contains method for intersecting two ArrayLists.
- LitsearchBase.java
Superclass of all of the servlets. Handles some I/O, drawing
the template and error handling.
- MotifSearch.java
Servlet which performs the more complex "motif search". The motif search
uses synonyms of the words entered in the search query to find passages
that may bear a high similarity in topic and theme.
- PorterStemmer.java
Implements the Porter algorithm. I did not write this.
- Reader.java
Displays the full text of works on screen. As you can see from the
source, words are read in from the database word by word.
- Template.java
Very simple tag-based template.