Discussion Board
There are no previous messagesGo to the following message
Current Forum: Homework 5 - Parts 1 and 2
Date: Wed Nov 7 2001 9:11 pm
Author: Liu, Limin Angela <laliu@andrew.cmu.edu>
Subject: Part I and II error caused by PageHref.java

I ran into the same IOException error in Part II posted by quite a few groups already. Then I examined my output for Part I again (which is identical to Marc's post), and I found out that all links that are local to Dr. Lee's home directory http://www.cs.cmu.edu/~petel, such as contact.html, papers/pcc/pcc.html and students.html are causing the three IOExceptions, and their URL are messed up by the URL(URL context, String h) constructor called in PageHref.java.

So I changed the line into
href = new URL(context.toString() + "/" + h);
And then my part I output links are all good links, and part II has no more Exceptions.

I am interested in knowing other students' methods in solving this problem.
Post response

There are no previous messagesGo to the following message
Current Thread Detail:
Part I and II error caused by PageHref...      Liu, Limin Angela      Wed Nov 7 2001 9:11 pm       
base URL      Liu, Limin Angela      Thu Nov 8 2001 9:37 am       
Re: Part I and II error caused by P...      Boonyatera, Sunya Paul      Fri Nov 9 2001 11:45 pm       
Re: Part I and II error caused b...      Liu, Limin Angela      Sat Nov 10 2001 1:11 pm       

Back to previous screen