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=publicSome general information about servlets.
SNMPBean
,
Serialized FormConstructor 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, service
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
protected 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.HttpServlet
javax.servlet.ServletException
java.io.IOException
protected long getLastModified(javax.servlet.http.HttpServletRequest req)
getLastModified
in class javax.servlet.http.HttpServlet
public java.lang.String getServletInfo()
getServletInfo
in interface javax.servlet.Servlet
getServletInfo
in class javax.servlet.GenericServlet