• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why this is right?

 
ming wu
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, In HF book p48 code example, there is this line


what's the " . " dot for? is it a class in a package inside the web app?

Thanks!
 
Roger Yates
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. Servlet1 is a class in the foo package.
When you deploy it, all classes go into /WEB-INF/classes, so in this case it would end up as:
/WEB-INF/classes/foo/Servlet1.class

(or it could go in a .jar, but you'll get to that later!)
[ October 20, 2004: Message edited by: Roger Yates ]
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is normal because if you only specify the Servlet class name without its package, the container does not know where to pick up your Servlet.

Nick
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're suppose to specify the fully qualified name of the servlet class there.

HTH.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thus, be aware of those tricky questions in the exam.

Something that seems correct may be wrong in fact.

Nick
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic