package dynDns; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; /** *

DynDns ghost servlet

*

alexis.grandemange@pagebox.net

*

Copyright (c) 2002-2003 Alexis Grandemange

*
This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation; version 2.1 of the
 * License.
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 * A copy of the GNU Lesser General Public License lesser.txt should be
 * included in the distribution.
* @author Alexis Grandemange */ public class Update extends HttpServlet { private static StringBuffer html = new StringBuffer(); /** * GET request handling. * @param request HttpServletRequest. * @param response HttpServletResponse. */ public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { synchronized(html) { String sys = request.getParameter("system"); PrintWriter out = response.getWriter(); if (!sys.equals("dyndns")) out.println("dyndns"); String host = request.getParameter("hostname"); String addr = request.getParameter("myip"); String wildcard = request.getParameter("wildcard"); String offline = request.getParameter("offline"); html.append(""); html.append(sys); html.append(""); html.append(host); html.append(""); html.append(addr); html.append(""); html.append(wildcard); html.append(""); html.append(offline); html.append(""); out.println("good"); } } /** * Return dyndns queries. * @return String HTML stream */ static public String getHtml() { synchronized(html) { return html.toString(); } } }