java.lang.Object
javax.servlet.GenericServlet
- All Implemented Interfaces:
- Serializable, Servlet, ServletConfig
- Direct Known Subclasses:
- HttpServlet
- See Also:
- Top Examples, Source Code
public void destroy()
- See Also:
- Servlet
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public GenericServlet()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[1843]Simple "Hello World" servlet
By Anonymous on 2006/11/15 14:26:16 Rate
// Hello.java
import java.io.*;
import javax.servlet.*;
public class Hello extends GenericServlet {
public void service ( ServletRequest request, ServletResponse response )
throws ServletException, IOException {
response.setContentType ( "text/html" ) ;
PrintWriter pw = response.getWriter ( ) ;
pw.println ( "Hello, world!" ) ;
pw.close ( ) ;
}
}
public String getInitParameter(String name)
- See Also:
- ServletConfig
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public Enumeration getInitParameterNames()
- See Also:
- ServletConfig
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public ServletConfig getServletConfig()
- See Also:
Servlet.init(javax.servlet.ServletConfig)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public ServletContext getServletContext()
- See Also:
- ServletConfig
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public String getServletInfo()
- See Also:
- Servlet
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public String getServletName()
- See Also:
- ServletConfig
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void init()
throws ServletException
- See Also:
-
getServletConfig()
, init(ServletConfig)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void init(ServletConfig config)
throws ServletException
- See Also:
UnavailableException
, Servlet
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void log(String msg)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void log(String message,
Throwable t)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract void service(ServletRequest req,
ServletResponse res)
throws ServletException,
IOException
- See Also:
- Servlet
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples