Registers a servlet into the URI namespace.
The alias is the name in the URI namespace of the Http Service at which the registration will be mapped.
An alias must begin with slash ('/') and must not end with slash ('/'), with the exception that an alias of the form "/" is used to denote the root alias. See the specification text for details on how HTTP requests are mapped to servlet and resource registrations.
The Http Service will call the servlet's {@code init} method beforereturning.
httpService.registerServlet("/myservlet", servlet, initparams, context);
Servlets registered with the same {@code HttpContext} object will sharethe same {@code ServletContext}. The Http Service will call the {@code context} argument to support the {@code ServletContext} methods{@code getResource}, {@code getResourceAsStream} and {@code getMimeType}, and to handle security for requests. If the {@code context} argument is{@code null}, a default {@code HttpContext} object is used (see{@link #createDefaultHttpContext()}).
@param alias name in the URI namespace at which the servlet is registered
@param servlet the servlet object to register
@param initparams initialization arguments for the servlet or{@code null} if there are none. This argument is used by theservlet's {@code ServletConfig} object.
@param context the {@code HttpContext} object for the registered servlet,or {@code null} if a default {@code HttpContext} is to be createdand used.
@throws NamespaceException if the registration fails because the alias isalready in use.
@throws javax.servlet.ServletException if the servlet's {@code init}method throws an exception, or the given servlet object has already been registered at a different alias.
@throws java.lang.IllegalArgumentException if any of the arguments areinvalid