Java(JSP)

1
response.setHeader("Location", "welcome.jsp");

JS

1
window.location.href="url";