Servlet API - ServletConfig interface brief description

zhaozj2021-02-16  50

A brief description of the servletconfig interface: Public interface servletConfig A servlet configuration object used by the servlet container is used to transfer information to it when servlet is initialized.

GetServletName () Method Overview: Public Java.lang.String GetServletName () This method returns a name of a servlet instance that is provided by the server administrator.

GetServletContext () method Overview: Public servletContext GetServletContext () Returns a reference to a servletContext object.

GetInitParameter () Method Overview: Public Java.lang.String GetInitParameter (java.lang.string name) Returns a value of the initialization variable determined by the parameter String Name, and returns NULL if the variable does not exist.

GetInitParameterNames () Method Overview: Public Java.util.EnuMeration GetInitParameterNames () Returns a enumeration function that stores all initialization variables. If the servlet does not initialize the variable, return an empty enumeration function.

Finally, the servletconfig interface is implemented by the GenericServlet class.

转载请注明原文地址:https://www.9cbs.com/read-20485.html

New Post(0)