• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

HTTP Status 500 Error

 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

. In the lib directory, six needed jar files are included(referenced in page 11).



for those of us that dont have that book, can you please list down the six jar files?
 
Ailsa Cape
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Richard,

I am sorry for missing that. But you can download the free chapter of this book in this site. The six needed jar files are jsf/lib/jsf-api.jar, jsf/lib/jsf-impl.jar, tomcat/server/lib/commons-digester.jar,
tomcat/server/lib/commons-beanutils.jar, tomcat/webapps/jsp-examples/WEB-INF/lib/jstl.jar, tomcat/webapps/jsp-examples/WEB-INF/lib/standard.jar.

Here the version of Tomcat must be 5.0.X, NOT 5.5.X and the JSF implementation version is 1.0 or 1.1.
Someone said when we use Myfaces package for MyEclipse to create a JSF project, there will be no error because this utility had added the listener tag in the web.xml.

Regards,
Ailsa
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic