Hello everyone,
I have been studying
core JavaServer Faces recently. After I
test the sample application of number quiz in chapter 2, I always get the
HTTP Status 500 error. Its description is:
The server encountered an internal error () that prevented it from fulfilling this request. The directory structure I use is the same as Figure 2-5 in page 47. After that, I compile the two .java files(ProblemBean.java & QuizBean.java) and place the generated .class files into the WEB-INF/classes/com/corejsf directory. I also add a directory named lib, which parent is WEB-INF. In the lib directory, six needed jar files are included(referenced in page 11).
After I put the whole application in the
Tomcat's webapps directory and start it, I input "http://localhost:8080/numberquiz"in the browser and get the above error. I am eager to know the reason because I think I have done exactly accorging to what the book had instructed and correct two errors in the faces-config.xml(change index.faces to index.jsp). By the way, Tomcat version I use is 5.0.28,
JSF is 1.0 and browser is IE6.0. After I had been looking the Internet all the afternoon, I finally find the solution to it. In the web.xml, I should add the following tags:
But I still don't know why I must do this. Please give me some advice!
Thanks in advance!
Ailsa Cape
[ February 07, 2007: Message edited by: Ailsa Cape ]