public class ReachHostServlet
extends javax.servlet.http.HttpServlet
The ReachHostServlet servlet uses the IsHostReachableBean to see if a host is reachable.
It will hold the connection until it has received the information. Then it will print the date the host went up, following by a nice HTML form which makes it easier to do a next request.
This servlet should be installed on a Java bases webserver. The parameters should be a part of the URL. If no parameters are send, the servlet will use the default values.
http:<servlet URL>?host=localhost&port=161&comm=public
Some general information about servlets.SNMPBean,
Serialized Form| Constructor and Description |
|---|
ReachHostServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) |
protected long |
getLastModified(javax.servlet.http.HttpServletRequest req) |
java.lang.String |
getServletInfo() |
void |
init(javax.servlet.ServletConfig config) |
doDelete, doHead, doOptions, doPost, doPut, doTrace, service, servicepublic void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Servletinit in class javax.servlet.GenericServletjavax.servlet.ServletExceptionprotected void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionjava.io.IOExceptionprotected long getLastModified(javax.servlet.http.HttpServletRequest req)
getLastModified in class javax.servlet.http.HttpServletpublic java.lang.String getServletInfo()
getServletInfo in interface javax.servlet.ServletgetServletInfo in class javax.servlet.GenericServlet