If you "register" the servlet in your web.xml, you give it the complete classpath to the servlet (which must, of course, be in the classpath). If you don't need init params, your can just refer to it using the /servlet/ path in the URL. Were you looking for more explicit details? hth, bear
Originally posted by Bear Bibeault: If you "register" the servlet in your web.xml, you give it the complete classpath to the servlet (which must, of course, be in the classpath).
Does every app server have a web.xml file which will have entries for each servlet, or is this something that is specific to a particular app server? Thanks, Corey
The notion of a web application was introduced with version 2.2 of the Servlet API. Web applications are a very important concept in that they allow a portable way to structure and bundle applications containing servlets, jsp, and other resources (images, html pages, etc.). The "glue" that binds this application together is an XML descriptor named web.xml (found in the WEB-INF directory off of the application root directory). Within web.xml you can specify things like servlet names, servlet mappings, welcome files, error pages, security constraints, etc. Prior to version 2.2 each servlet container had their own way of defining things like servlet mappings, so this really hindered the ability to port applications from one vendor to the next; web applications have solved this problem (for the most part).
Karl Moss,<br />Author of <a href="http://www.amazon.com/exec/obidos/ASIN/007222262X/ref=ase_electricporkchop" target="_blank" rel="nofollow">Java Servlets Developer's Guide</a> <br /><a href="http://www.servletguru.com" target="_blank" rel="nofollow">ServletGuru.com</a> the Companion site.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.