Source Code : Client Pull and Move
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
Client Pull and Move
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class ClientPullMove extends HttpServlet {
static final String NEW_HOST = "http://www.java2s.com";
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
res.setContentType("text/html");
PrintWriter out = res.getWriter();
String newLocation = NEW_HOST + req.getRequestURI();
res.setHeader("Refresh", "10; URL=" + newLocation);
out.println("The requested URI has been moved to a different host.<BR>");
out.println("Its new location is " + newLocation + "<BR>");
out.println("Your browser will take you there in 10 seconds.");
}
}
Thank with us