This assignment for me was a little more difficult, but no overly so. I had a trouble at first with formatting the logging, but I got it eventally. I started with SingleFileHTTPServer as instructed, but I found myself using more and more JHTTP code fragments to replace what was used in SingleFileHTTPServer. It was interesting to not the differences between the two programs, and I learned a lot going through the exercise. In th end, I found that I had basically transformed SingleFileHTTPServer into something that actually very closely resembles JHTTP. I did have one problem that I wasn't able to correctly solve with the logging format - getting the header code (eg. "200") and the amount of bytes transferred out of the code into the log file. I could display the proper values using sysout on the console, but couldn't figure out the missing llink to get them into the log. I know I was overlooking something very obvious.... Also, I don't know if anyone else experienced this, but I ended up with a separate class to handle the content (basically RequestProcessor) - compiling this class separately from the main class caused problems - closing ports, etc so the attachments woudn't refresh properly in the browser. If I made a change to the handler class, I had to re-compile the main class to preserve proper functionality. Interesting exercise, for sure, and this one ended up taking the longest (I proresssed through the course materials and started (and completed!) Assignment 3 and started Assignmet 4 before submitting this Assignment.
The Landing is a social site for Athabasca University staff, students and invited guests. It is a space where they can share, communicate and connect with anyone or everyone.
Unless you are logged in, you will only be able to see the fraction of posts on the site that have been made public. Right now you are not logged in.
If you have an Athabasca University login ID, use your standard username and password to access this site.
We welcome comments on public posts from members of the public. Please note, however, that all comments made on public posts must be moderated by their owners before they become visible on the site. The owner of the post (and no one else) has to do that.
If you want the full range of features and you have a login ID, log in using the links at the top of the page or at https://landing.athabascau.ca/login (logins are secure and encrypted)
Posts made here are the responsibility of their owners and may not reflect the views of Athabasca University.