I have a question from the Head First
Servlets and
JSP book. I solved
the problem that I had as I was creating this post, but I decided to submit it anyway because other people might be having the same problem.
I successfully installed Apache
Tomcat version 5.0.28 (along with
J2EE and
Java standard edition) on a computer with Norton AntiVirus and the Windows XP operating system (with all of the available bug fixes and security updates). When
http://localhost:8080/ is entered into the address text field of the Internet Explorer 6 web browser, the default "you've setup Tomcat successfully" page is displayed. (Apparently, I also
correctly set the environment and class path variables for the two versions of Java and Tomcat.)
So then I created the form.html file and put it into the directory:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\Beer-v1.
Then I would enter
http://localhost:8080/Beer-v1/form.html in IE6, but
the form would not display, (only the default error page). So I rebooted
my computer several times and cleared the cookies, temporary files, and
history information from IE6. I still could not get the form.html page to display, so I put a copy of form.html in the ...webapps\servlets-examples folder. Typing
http://localhost:8080/servlets-examples/form.html in IE6 got the form.html page to display.
However, I tried one more time to get the form.html to display from the Beer-V1 directory and it finally worked. (I also passed the previous version of the SCWCD exam with a good score, so I'm not a total beginner to servlets and JSP).
Does any one know why the example in the book would not work and then finally work after several attempts? Also, the examples in the book appear
to be for a Unix or an Apple computer, and the instructions for getting Tomcat had a minor error, but I was able to easily solve those issues.
I thought the answer to the problem might require setting permissions for
the folders and/or users on my computer.
Paul Heckman