<?xml version="1.0"?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2"> <jsp:directive.page import="java.io.*,java.net.*,java.util.*,com.perforce.api.*"/> <jsp:useBean id="base_env" scope="application" class="com.perforce.api.Env"/> <jsp:useBean id="env" scope="session" class="com.perforce.api.Env"/> <jsp:scriptlet> String loggedin = (String)session.getAttribute("loggedin"); if (base_env.getUser().equals("robot")) { base_env.setFromProperties("/etc/p4jsp.conf"); } String dest = request.getRequestURI(); if (null != request.getQueryString()) dest += "?"+request.getQueryString(); dest = response.encodeRedirectURL("login.jsp?dest="+URLEncoder.encode(dest)); if (null == loggedin || env.getUser().equals("robot")) { env.setFromProperties(base_env.getProperties()); env.setPassword(""); session.removeAttribute("loggedin"); response.sendRedirect(dest); return; } try { env.checkValidity(); } catch (PerforceException pex) { session.removeAttribute("loggedin"); response.sendRedirect(dest); return; } String title = "P4JSP"; </jsp:scriptlet> </jsp:root>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 5093 | Hari Krishna Dara |
Populating perforce branch. I will be adding p4admin files to it. |
||
//public/perforce/api/java/p4jsp/web/session.jsp | |||||
#2 | 2212 | David Markley | Fixed useBean bug to support Tomcat 4.1.12 | ||
#1 | 1983 | David Markley | Branched p4jsp from guest to public depot. | ||
//guest/david_markley/p4jsp/web/session.jsp | |||||
#3 | 1847 | David Markley | Added package information for a more public distribution. | ||
#2 | 1842 | David Markley | Updated pages to include titles and added view and diff pages. | ||
#1 | 1824 | David Markley | Added initial files for p4jsp. |