This blog is having some sort of guidelines about below technologies. Hoping this would be helpful to the people who want to gain knowledge on open sources web development.
Use the response implicit object to redirect the browser to a different resource response.sendRedirect("http://www.xyzs.com/path/error.html");
Also physically change the Location HTTP header attribute.
Do this before any output has been sent to the client. This should be the case with the response.sendRedirect() method also.