This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hello there, now this is getting real bad. Is it just me with my interpretations of what I read or is it false what the book says. pg 107 sybex book on the web component certification "If mapping information is not included, the container will look to default directories defined by the servers deployement descriptor" This statement gave me the impression that the mapping element in the web xml file helps the container find where the physical location of the servlet class file is. in reality according to the specification the mapping just lets us have a URL pattern that can be mapped to a servlet. Also from my little understanding the servlet class files seemingly can be stored only in the WEB-INF directory. Could someone please clarify if there is way to store my servlets in any other location and then have some sort of mapping to this. Thanks a lot Jack
I am also new to servlets, so the following is only what I understood so far. If it is totally incorrect, please accept my apologies and correct me. I believe the hierarchy starting from WEB-INF is fixed. We have to follow this. The only variation may be a directory/package you place after "classes" and follow it thru in the <servlet>, <servlet-class>. Whatever is before that, I think, should be governed by the top-level mapping present in server.xml. The default mapping tells the web-server/container to look at webapps/examples/WEB-INF/classes for the servlets. Can someone explain what all needs to be changed in server.xml (or anywhere else) in case I want my servlet classes to be accessed from the path webapps/myservlets/WEB-INF/classes ? Thanks, Sudd