<filename>PageRedirectingServlet/src/com/bridgelabz/pageredirecting/RedirectingServlet.java
package com.bridgelabz.pageredirecting;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class RedirectingServlet extends HttpServlet{
	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		response.setContentType("text/html");

		String name=request.getParameter("name");  
		response.sendRedirect("http://www.google.co.in#q="+name); 
	}
}
