Skip to content

Instantly share code, notes, and snippets.

@RELATO
Created October 25, 2015 12:05
Show Gist options
  • Save RELATO/430c3345bacbd56eb864 to your computer and use it in GitHub Desktop.
Save RELATO/430c3345bacbd56eb864 to your computer and use it in GitHub Desktop.
index.jsp to redirect to another site
<%@ page import="java.io.*,java.util.*" %>
<html>
<head>
<title>Page Redirection</title>
</head>
<body>
<center>
<h1>Page Redirection</h1>
</center>
<%
// New location to be redirected
String site = new String("http://www.relato.com.br");
response.setStatus(response.SC_MOVED_TEMPORARILY);
response.setHeader("Location", site);
%>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment