Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

SCWCD Exam Study kit problem

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No. Both were lowercase. Thanks.
 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Enthuware Software Support
Posts: 4850
52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic