• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HFSJ doubt page 31

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Nishant Dhar
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes you are correct. Even if it doesnt match, you will get a 404 error page.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic