<%@ page language="java" session = "false" %> <%@ page import="gov.va.med.authentication.kernel.ConfigurationVO, gov.va.med.authentication.kernel.LoginController, weblogic.servlet.security.ServletAuthentication;"%> <% // Turn off cache so that a user cannot navigate back to the login page after post-login response.setHeader("Cache-Control","no-store, no-cache, must-revalidate"); //HTTP 1.1 response.setHeader("Pragma","no-cache"); //HTTP 1.0 response.setDateHeader ("Expires", 0); //prevents caching at the proxy server %> Login Page <% /* It could be argued that using code within JSP is not a good thing, but for such a small app it's completely acceptable. If we were working with an HTML designer, the separation would be good. But then JSTL would be needed and with that we'd introduce some version of that as a dependency, which is preferably avoided given because we're embedded, we force these dependencies on the containing application as well. */ ConfigurationVO kaajeeEnv = ConfigurationVO.getInstance(); /* Here if the protocol is 'http', I redirected the user to the same page using 'https' protocol. */ if(request.getParameter("relogin")!=null){ HttpSession hSess = request.getSession(false); if(hSess == null) { StringBuffer sbsession = new StringBuffer(request.getContextPath()); sbsession.append("/login/SessionTimeout.jsp"); response.sendRedirect(sbsession.toString()); return; } } HttpSession hSess = request.getSession(true); String desiredSchema = "https"; //or http String usingSchema = request.getScheme(); if(kaajeeEnv.getHTTPSPortLis() != null ) { if(!desiredSchema.equals(usingSchema)) { StringBuffer sburl = request.getRequestURL(); java.net.URL url = new java.net.URL(sburl.toString()); hSess = request.getSession(true); Integer portValue = new Integer(url.getPort()); hSess.setAttribute("portnumber",portValue); String urlString = desiredSchema+"://"+ url.getHost() +":"+kaajeeEnv.getHTTPSPortLis()+url.getPath(); response.sendRedirect(response.encodeRedirectURL(urlString)); return; } } %>
System Announcements:
<%= kaajeeEnv.getIntroductoryText() %>
<% //1. Initialize values String kaajeeDefaultInstitutionValue = ""; String kaajeeDisableInstitutionComponentsValue = ""; String kaajeeSortStationByValue = ""; String kaajeeDisableSortStationByValue = ""; boolean kaajeeDefaultInstitutionParamFound = false; boolean kaajeeDisableInstitutionParamFound = false; boolean kaajeeSortStationByParamFound = false; boolean kaajeeDisableSortStationByParamFound = false; //2. Get targetURL and parse out parameters String targetURL = ServletAuthentication.getTargetURLForFormAuthentication(request.getSession()); if (targetURL == null) { StringBuffer sbNavErrorPg = new StringBuffer(request.getContextPath()); sbNavErrorPg.append("/login/navigationerror.jsp"); response.sendRedirect(sbNavErrorPg.toString()); return; } int paramPos = targetURL.indexOf('?'); String paramList = (paramPos > -1) ? targetURL.substring(paramPos + 1, targetURL.length()) : ""; String[] paramArray = paramList.split("\u0026"); //split on '&' char for (int i=0; i < paramArray.length; i++) { String[] tempArray=paramArray[i].split("\u003D"); //split on '=' char if (tempArray[0].indexOf("kaajeeDefaultInstitution") != -1) { kaajeeDefaultInstitutionValue = tempArray[1]; kaajeeDefaultInstitutionParamFound = true; } else { if (tempArray[0].indexOf("kaajeeDisableInstitutionComponents") != -1) { kaajeeDisableInstitutionComponentsValue = tempArray[1]; kaajeeDisableInstitutionParamFound = true; } else { if (tempArray[0].indexOf("kaajeeSortStationBy") != -1) { kaajeeSortStationByValue = tempArray[1]; kaajeeSortStationByParamFound = true; } else { if (tempArray[0].indexOf("kaajeeDisableSortStationBy") != -1) { kaajeeDisableSortStationByValue = tempArray[1]; kaajeeDisableSortStationByParamFound = true; } } } } if ((kaajeeDefaultInstitutionParamFound) && (kaajeeDisableInstitutionParamFound) && (kaajeeSortStationByParamFound) && (kaajeeDisableSortStationByParamFound)) break; } // //3. Get default login institution and sorting preference if any from cookies boolean sortCookieFound = false; boolean instCookieFound = false; String defaultSortInstBy=""; String defaultInst=""; String cookieDefaultSortInstitutionByString = LoginController.COOKIE_DEFAULT_SORT_INSTITUTION_BY_STRING; String cookieDefaultDivisionString = LoginController.COOKIE_DEFAULT_DIVISION_STRING; Cookie[] cookies = request.getCookies(); if (cookies != null) { for (int i=0;i 0) ? (kaajeeSortStationByValue.equals("number") ? "checked" : "") : ((defaultSortInstBy.equals("")) || (defaultSortInstBy.equals("number")) ? "checked" : "")); String radioButton2CheckValue = ((kaajeeSortStationByValue.trim().length() > 0) ? (kaajeeSortStationByValue.equals("name") ? "checked" : "") : ((defaultSortInstBy.equals("name")) ? "checked" : "")); %>

Login: <%= kaajeeEnv.getHostApplicationName() %>

Health e Vet Vista logo
Access Code:  
Verify Code:
name=sortInstBy value="number" onclick="reSortSelectOptions(this.form,this.form.institution,'value')">Sort by Station Number * name=sortInstBy value="name" onclick="reSortSelectOptions(this.form,this.form.institution,'text')">Sort by Station Name *
>
>
>
Institution: *  
 
 
   
* Persistent Cookie Used (more information).