Subversion Repositories Sigmater

Rev

Blame | Last modification | View Log | Download | RSS feed

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@page import="org.sigmater.srm.SrmUser"%>
<html>
        <head>
                <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
                <title>Redirect ...</title>
        </head>
        <body>
        <%
                String homeUrl = "http://" + request.getServerName() + ":" + 
                        request.getServerPort() + "/" + request.getContextPath();
                        
                String navigatoreUrl = request.getParameter("navigatoreUrl");
        
                SrmUser user = (SrmUser) session.getAttribute("principal");
        
                if (user == null || navigatoreUrl == null) {
                        response.sendRedirect(homeUrl);                 
                } else {
                        response.sendRedirect(navigatoreUrl + "?token=" + user.getTokenId());
                }
        %>
        </body>
</html>