For this Project 5 Server milestone, your project must extend your Project v4.2 Design code to create a multithreaded search engine with a web interface that allows users to enter multi-word search queries into an HTML form and get back sorted partial search results as a dynamically generated web page using embedded Jetty and servlets.
TABLE OF CONTENTS
You must complete the following assignments before beginning to work on this one:
Your main
method must be placed in a class named Driver
and must process the following additional command-line arguments:
-server [port]
where the flag -server
indicates to launch a multithreaded search engine web server and the next optional argument [port]
is the port the web server should use to accept socket connections. If the [port]
value is not provided, use 8080
as the default value. See the “Web Server” section below for details.
<aside>
<img src="/icons/info-alternate_gray.svg" alt="/icons/info-alternate_gray.svg" width="40px" /> Multithreading may now be enabled by the -threads
, -html
, or -server
flags. As before, if a valid number of threads are not provided, use 5
as the default.
</aside>
These are in addition to the command-line arguments from the previous Project v4.2 Design assignment.
The command-line flag/value pairs may be provided in any order or not at all. Do not convert paths to absolute form when processing command-line input!
Output user-friendly error messages in the case of exceptions or invalid input. Under no circumstance should your main()
method output a stack trace to the user!
The web server must provide a web interface that allows users to search through the inverted index generated by the Driver.main
method from the -text
or -html
command-line arguments. Specifically:
Driver.main
method.