<%@page import="gov.va.med.fw.security.SecurityContext"%>
<%@page import="gov.va.med.fw.security.SecurityContextHelper"%>
<%@page import="gov.va.med.fw.security.UserPrincipal"%>
<%    
    SecurityContext securityContext = SecurityContextHelper.getSecurityContext();
    UserPrincipal user = (securityContext != null) ? securityContext.getUserPrincipal() : null;
    if (user != null) {
    	String webContext = (String)request.getAttribute("webContext");
    	String wrapper = (String)request.getAttribute("wrapper");
    	if(webContext != null && wrapper != null) {
    	    ServletContext context = application.getContext(webContext);
    	    if(context != null) {
				RequestDispatcher reqDisp = context.getRequestDispatcher(wrapper);
				if(reqDisp != null) {
		    		reqDisp.include(request,response);
				}
	    	}
		}
    }
%>
