The Servlet Interface
All servlets must implement the Scrvlct interface. It declares. the inil( ), service( ), and dcstroy() methods that are called by the server during the life cycle of a servlet. A method is also provided that allows a servlet to obtain nil)’ initialization parameters. The methods defined by Servlet


Returns the value of the server attribute named nlir,
Returns the MIME type of file.
Returns the real path that corresponds 10 tho virtual path VP ltll.
Returns information about the server.
Returns the servlet named stunc,
Object getAttribute(String lIl/r)
String getMimeType(Strin~filt!)
String getRealPath(String vl’ntl:)
String gets crverlnfo( )
Scrvlet gctS crv let(Slring ;nlllllL’) throws Sqlexception

Enumeration getServlet Names( )
void log(String s)
void 10g(Exception c, String s)

reCAPTCHA is required.

Share This