w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Jetty :: ServletContextHandler#setContextPath(..) and how to associate Servlets with specific file extensions

It should conform basically to the servlet specification, where an URL consists of http://host:port/<context-root>/<servlet-path-spec>, where the Context root is defined by setContextPath and the Servlet path specification is defined by the second parameter of addServlet. So the servlet in your example would serve all URLs starting with http://host:port/a/b/.

The Servlet path specification does also allow to define mappings to file extensions, with the notation "*.xsd" in your example, see section 12.2 in the linked specification.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.