• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SCWCD Exam Study kit problem

 
Xiaochen Du
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi JavaRancher,
I am new to SCWCD. I am reading SCWCD Exam Study kit. But have problem to run the examples in the CD. I copied all the files in in chapter-example-webapp to my webapp directory ( as the readme said). The html files can be viewed correctly, but I can't run severlets (.class).
Those files are in
Tomcat 4.1\webapps\ChapterXX\WEB-INF\classes.
run it by
http://127.0.0.1:8080/chapter01/servlet/HelloWorldServlet
The error message is
---------------------------------------------
HTTP Status 404 - /chapter01/servlet/HelloWorldServlet
--------------------------------------------------------------------------------
type Status report
message /chapter01/servlet/HelloWorldServlet
description The requested resource (/chapter01/servlet/HelloWorldServlet) is not available.

---------------------------------------------
I installed Tomcat 4.1.18.
I tried copy the .class file to Tomcat 4.1\webapps\examples\WEB-INF\classes
It works fine.
Does anybody can help me out? Thanks so lot.
[ March 07, 2003: Message edited by: Xiaochen Du ]
 
Tom Adams
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quick guess but, the url is case sensitive...so if the directory is Chapter01 then chapter01 will not work.
 
Xiaochen Du
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. Both were lowercase. Thanks.
 
Ken Januski
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is your web.xml set up correctly so that the servlet can be found?
I'm reading the same book at the moment. Do you know if the example also tells you how to setup the web.xml? If so does the servlet have the correct case in it?
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3817
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try the updated code available at http://jdiscuss.com
 
Xiaochen Du
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank Paul, Ken and Tom. It works now.
Just as Paul said. I updated the new code.
FYI: un-jar use
jar -cvf ***.jar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic