Thanks, Ernest. That solved the problem. I do have a couple of other questions, though.
1.) Did I put the line you suggested in the right place? When I added that line, my attempt to compile failed, with "unreported exception java.io.IOException; must be caught or declared to be thrown" and was referencing the .getWriter() method. I'm still trying to learn about throwables and exceptions, in general, but adding "throws IOException" to doGet fixed the problem. I don't like fixing things without knowing why...
2.) Can the location of the text file be relative? I was using "text.txt", but when I added the "throws", I was able to see in the output window (my cmd.exe that's running
Tomcat) that
Java couldn't find the file. Making it an absolute location, as shown below, works, but that obviously limits portability.