For this homework assignment, you will create a web-based HTML cleaner using the code you created in Homework 8: HTML Cleaner.
You must submit this homework to your SVN repository using Eclipse. Your homework, including the src directory and all required source code files must be at the following location:
https://www.cs.usfca.edu/svn/<username>/cs212/homework09/
where <username> is your CS username in all lowercase letters. Failure to properly submit your homework will result in a point deduction.
You must submit this programming homework by 11:59pm on FRIDAY, April 12, 2013.
You must create a Jetty server named Driver that maps a single servlet to the /words path. This servlet should do the following:
Handle GET requests ONLY (do not handle any POST requests).
If a URL is provided as a query parameter, uses HTMLCleaner.fetchWords() to get the words from that URL and display them as an ordered list.
If a URL is provided and there are no words parsed for any reason, display a short warning message.
Display a HTML form that allows a user to specify a URL to be parsed. The form should use GET as the method.
You should have a Driver class, HTMLCleaner class, servlet class, and any additional classes required by your code in your SVN repository.
Below are some SAMPLE screenshots. Your web pages do not need to look exactly the same.
Showing both words fetched from a URL and the form to parse a new URL.
Showing just the URL form since no URL was specified as a parameter.
Showing an error message since the provided URL could not be fetched.
There are no unit tests for this assignment. To see if your code is working, try the following URLs by hand:
It is possible your HTMLCleaner does not pass all of the unit tests from the previous homework assignment. However, you should still be able to have the basic functionality for this assignment.