import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
public class MyServlet extends HttpServlet {
static final String NEW_HOST = "http://www.rntsoft.com";
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
res.setContentType("text/html");
PrintWriter out = res.getWriter();
String newLocation = NEW_HOST;
res.setHeader("Refresh", "10; URL=" + newLocation);
out.println("The requested URI has been moved to a different host.
");
out.println("Its new location is " + newLocation + "
");
out.println("Your browser will take you there in 10 seconds.");
}
}
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
MyServletName
MyServlet
MyServletName
/index.html