I've gotten some of the project working, but I have a few questions that I was hoping someone could answer: We're give some classes to start with. Here's the relevant ones: WebServer.java
There's few parts I have questions about, but need most help in how to implement this class: Blocker - Takes two arguments. The first argument is a string containing no white space and the second is a URL (e.g., http://marlowe.cs.umd.edu:33217/Blocker/gambling/http://www.goodfun.com). Your code will retrieve the requested URL and determine whether the URL's contents contain the string given in the first argument. If the URL content does not contain the string return those contents to the client, passing on the Content-type it receives. Otherwise, return the string "Site blocked", passing Content-type:text/plain.
Once I have the url how do I parse through it's contents to see if the word is there? That's the part I'm unsure of. Also, if I run WebServer.java it says listening on port xxxxx. How do I run a servlet from that point. They said the generic url would be http://marlowe.cs.umd.edu:xxxxx/Foobar/Args. I tried it and couldn't connect. Do I have to be on the school network to connect or do I need to add a few lines of code to run it? Thanks for any help, Mark
Mark Modaressi<BR><A HREF="http://www.typer673.com" TARGET=_blank rel="nofollow">TypeR673.com</A><BR><A HREF="http://www.k2kmotorsports.com" TARGET=_blank rel="nofollow">K2K Motorsports</A>