1 9 package org.jboss.portal.core.servlet; 10 11 import java.io.IOException ; 12 13 import javax.servlet.ServletException ; 14 import javax.servlet.http.HttpServlet ; 15 import javax.servlet.http.HttpServletRequest ; 16 import javax.servlet.http.HttpServletResponse ; 17 18 24 public class AuthenticationServlet extends HttpServlet 25 { 26 27 protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException , IOException 28 { 29 doPost(req, resp); 30 } 31 32 protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException , IOException 33 { 34 String redirect = req.getParameter("redirect"); 36 37 String url = redirect == null ? req.getContextPath() : redirect; 39 resp.sendRedirect(url); 40 } 41 } 42 | Popular Tags |