my dog learned polymorphism*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes HFSJ doubt page 31 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "HFSJ doubt page 31" Watch "HFSJ doubt page 31" New topic
Author

HFSJ doubt page 31

Nishant Dhar
Greenhorn

Joined: Sep 09, 2005
Posts: 26
hi ... maybe I am missing something conceptually .. all help appreciated

on page 31 (HFSJ), the 8th point says
http://localhost:8080/ch1/serv1

isnt the above line trying to access a servlet directly, since /serv1 maps to Ch1Servlet.class
my point is that Ch1Servlet.class is within WEB-INF. i read somewhere that anything within WEB-INF cannot be served/accessed directly by the client.
isnt this a contradiction

nishant
Rizwan Mohammad
Ranch Hand

Joined: Sep 02, 2005
Posts: 445
Hi,
This URL http://localhost:8080/ch1/serv1 need not be pointing to servlet directly. In web.xml you can have mapping for /serv1 to actual servlet.

you will learn more on servlet mapping and url-patterns in chapters to follow.


Rizwan
SCJA, SCJP, SCWCD, SCBCD, SCDJWS.
Nishant Dhar
Greenhorn

Joined: Sep 09, 2005
Posts: 26
i see ..so I guess that means that if the /serv1 maps to a servlet in WEB-INF then it is ok to type such a URL
Rizwan Mohammad
Ranch Hand

Joined: Sep 02, 2005
Posts: 445
Yes you are correct. Even if it doesnt match, you will get a 404 error page.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HFSJ doubt page 31