@@ -0,0 +1,778 @@
+package de.asw.courses.web2016.demo.backend.servlet.redir;%0A%0Aimport java.io.IOException;%0A%0Aimport javax.servlet.ServletException;%0Aimport javax.servlet.annotation.WebServlet;%0Aimport javax.servlet.http.HttpServlet;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0A%0A/**%0A * %7B@code http://localhost:8080/asw2016-demo-webapp/redirect?redirect_uri=http://www.google.de %7D%0A * @author tom%0A *%0A */%0A@WebServlet(%22/redirect%22)%0Apublic class ExternalRedirectionExampleServlet extends HttpServlet%7B%0A%09%0A%09@Override%0A%09protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException %7B%0A%09%09%0A%09%09String redirectUri = req.getParameter(%22redirect_uri%22);%0A%09%09resp.sendRedirect(redirectUri); // sends a 302 Temporary Redirect%0A%09%7D%0A%7D%0A

Add redirection examples