portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r548359 - in /portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/security: chgpwd/change-password.jsp login/login-xhtmlbasic.jsp login/login.jsp login/portal-login.jsp
Date Mon, 18 Jun 2007 13:55:48 GMT
Author: ate
Date: Mon Jun 18 06:55:47 2007
New Revision: 548359

URL: http://svn.apache.org/viewvc?view=rev&rev=548359
Log:
Correcting on fix for: JS2-681: Login portlet doesn't run in Tomcat ROOT context
See: http://issues.apache.org/jira/browse/JS2-681#action_12505814

Modified:
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/security/chgpwd/change-password.jsp
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/security/login/login-xhtmlbasic.jsp
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/security/login/login.jsp
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/security/login/portal-login.jsp

Modified: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/security/chgpwd/change-password.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/security/chgpwd/change-password.jsp?view=diff&rev=548359&r1=548358&r2=548359
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/security/chgpwd/change-password.jsp
(original)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/security/chgpwd/change-password.jsp
Mon Jun 18 06:55:47 2007
@@ -23,6 +23,11 @@
 
 <portlet:defineObjects/>
 <fmt:setBundle basename="org.apache.jetspeed.portlets.security.resources.ChgPwdResources"
/>
+<c_rt:set var="requestContext" value="<%=request.getAttribute(RequestContext.REQUEST_PORTALENV)%>"/>
+<c:set var="portalContextPath" value="${requestContext.request.contextPath}"/>
+<c:if test="${empty portalContextPath}">
+  <c:set var="portalContextPath" value="/"/>
+</c:if>
 
 <c:choose>
   <c:when test="${pageContext.request.userPrincipal != null}">
@@ -83,8 +88,7 @@
               </c:when>
               <c:otherwise>
                 <br/><br/>
-                <c_rt:set var="requestContext" value="<%=request.getAttribute(RequestContext.REQUEST_PORTALENV)%>"/>
-                <a href='<c:url context="${requestContext.request.contextPath}/" value="/login/logout"/>'><fmt:message
key="chgpwd.label.Logout"/></a>
+                <a href='<c:url context="${portalContextPath}" value="/login/logout"/>'><fmt:message
key="chgpwd.label.Logout"/></a>
               </c:otherwise>
             </c:choose>
           </c:if>

Modified: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/security/login/login-xhtmlbasic.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/security/login/login-xhtmlbasic.jsp?view=diff&rev=548359&r1=548358&r2=548359
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/security/login/login-xhtmlbasic.jsp
(original)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/security/login/login-xhtmlbasic.jsp
Mon Jun 18 06:55:47 2007
@@ -21,12 +21,16 @@
 <%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c_rt"%>
 <fmt:setBundle basename="org.apache.jetspeed.portlets.security.resources.LoginResources"
/>
 <c_rt:set var="requestContext" value="<%=request.getAttribute(RequestContext.REQUEST_PORTALENV)%>"/>
+<c:set var="portalContextPath" value="${requestContext.request.contextPath}"/>
+<c:if test="${empty portalContextPath}">
+  <c:set var="portalContextPath" value="/"/>
+</c:if>
 <c:choose>
   <c:when test="${pageContext.request.userPrincipal != null}">
     <fmt:message key="login.label.Welcome"><fmt:param><c:out value="${pageContext.request.userPrincipal.name}"/></fmt:param></fmt:message><br/>
-    <a href='<c:url context="${requestContext.request.contextPath}/" value="/login/logout"/>'><fmt:message
key="login.label.Logout"/></a>
+    <a href='<c:url context="${portalContextPath}" value="/login/logout"/>'><fmt:message
key="login.label.Logout"/></a>
     <br/>
-    <a href='<c:url context="${requestContext.request.contextPath}/" value="/portal/my-account.psml"/>'><fmt:message
key="login.label.ChangePassword"/></a>
+    <a href='<c:url context="${portalContextPath}" value="/portal/my-account.psml"/>'><fmt:message
key="login.label.ChangePassword"/></a>
   </c:when>
   <c:otherwise>
     <%-- backdoor access to the portal session to get the login error count --%>
@@ -43,7 +47,7 @@
         </c:if>
       </c:otherwise>
     </c:choose>   
-    <form method="post" action='<c:url context="${requestContext.request.contextPath}/"
value="/login/proxy"/>'>
+    <form method="post" action='<c:url context="${portalContextPath}" value="/login/proxy"/>'>
       <div>
         <fmt:message key="login.label.Username"/>
         <c_rt:set var="userName" value="<%=((RequestContext)request.getAttribute(RequestContext.REQUEST_PORTALENV)).getSessionAttribute(LoginConstants.USERNAME)%>"/>

Modified: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/security/login/login.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/security/login/login.jsp?view=diff&rev=548359&r1=548358&r2=548359
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/security/login/login.jsp
(original)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/security/login/login.jsp
Mon Jun 18 06:55:47 2007
@@ -23,30 +23,27 @@
 <fmt:setBundle basename="org.apache.jetspeed.portlets.security.resources.LoginResources"
/>
 
 <c_rt:set var="requestContext" value="<%=request.getAttribute(RequestContext.REQUEST_PORTALENV)%>"/>
-<%
-  RequestContext rc = (RequestContext)request.getAttribute(RequestContext.REQUEST_PORTALENV);
-  String encoder = rc.getRequest().getParameter("encoder");
-  String dstLogin = "/login/proxy";
-  String dstLogout = "/login/logout";
-  String dstAccount = "/portal/my-account.psml";
-  if (encoder != null && encoder.equals("desktop"))
-  {
-      dstLogin = dstLogin + "?" +  LoginConstants.DESTINATION + "=" + rc.getRequest().getContextPath()
+ "/desktop";
-      dstLogout = dstLogout + "?" +  LoginConstants.DESTINATION + "=" + rc.getRequest().getContextPath()
+ "/desktop";
-      dstAccount = "/desktop/my-account.psml" + "?" +  LoginConstants.DESTINATION + "=" +
rc.getRequest().getContextPath() + "/desktop";
-  }
-%>
-<c_rt:set var="destLogin" value="<%=dstLogin%>"/>
-<c_rt:set var="destLogout" value="<%=dstLogout%>"/>
-<c_rt:set var="destAccount" value="<%=dstAccount%>"/>
-
+<c_rt:set var="loginDestination" value="<%=LoginConstants.DESTINATION%>"/>
+<c:set var="portalContextPath" value="${requestContext.request.contextPath}"/>
+<c:if test="${empty portalContextPath}">
+  <c:set var="portalContextPath" value="/"/>
+</c:if>
+<c:set var="encoder" value="${requestContext.request.parameterMap.encoder[0]}"/>
+<c:set var="destLogin" value="/login/proxy"/>
+<c:set var="destLogout" value="/login/logout"/>
+<c:set var="destAccount" value="/portal/my-account.psml"/>
+<c:if test="${not empty encoder && encoder == 'desktop'}">
+  <c:set var="destLogin" value="${destLogin}?${loginDestination}=${requestContext.request.contextPath}/desktop"/>
+  <c:set var="destLogout" value="${destLogout}?${loginDestination}=${requestContext.request.contextPath}/desktop"/>
+  <c:set var="destAccount" value="/desktop/my-account.psml?${loginDestination}=${requestContext.request.contextPath}/desktop"/>
+</c:if>
 <div class="portlet-section-text">
 <c:choose>
   <c:when test="${pageContext.request.userPrincipal != null}">
     <fmt:message key="login.label.Welcome"><fmt:param><c:out value="${pageContext.request.userPrincipal.name}"/></fmt:param></fmt:message><br>
-    <a href='<c:url context="${requestContext.request.contextPath}/" value="${destLogout}"/>'><fmt:message
key="login.label.Logout"/></a>
+    <a href='<c:url context="${portalContextPath}" value="${destLogout}"/>'><fmt:message
key="login.label.Logout"/></a>
     <br>
-    <a href='<c:url context="${requestContext.request.contextPath}/" value="${destAccount}"/>'><fmt:message
key="login.label.ChangePassword"/></a>
+    <a href='<c:url context="${portalContextPath}" value="${destAccount}"/>'><fmt:message
key="login.label.ChangePassword"/></a>
   </c:when>
   <c:otherwise>
     <%-- backdoor access to the portal session to get the login error count --%>
@@ -70,7 +67,7 @@
         </c:if>
       </c:otherwise>
     </c:choose>   
-    <form method="POST" action='<c:url context="${requestContext.request.contextPath}/"
value="${destLogin}"/>'>
+    <form method="POST" action='<c:url context="${portalContextPath}" value="${destLogin}"/>'>
       <table border="0">
       <tr>
         <td><div class="portlet-form-field-label"><fmt:message key="login.label.Username"/></div></td>
@@ -88,4 +85,4 @@
     </form>
   </c:otherwise>
 </c:choose>
-</div>
+</div>
\ No newline at end of file

Modified: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/security/login/portal-login.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/security/login/portal-login.jsp?view=diff&rev=548359&r1=548358&r2=548359
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/security/login/portal-login.jsp
(original)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/security/login/portal-login.jsp
Mon Jun 18 06:55:47 2007
@@ -21,15 +21,18 @@
 <%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c_rt"%>
 
 <fmt:setBundle basename="org.apache.jetspeed.portlets.security.resources.LoginResources"
/>
-
 <c_rt:set var="requestContext" value="<%=request.getAttribute(RequestContext.REQUEST_PORTALENV)%>"/>
+<c:set var="portalContextPath" value="${requestContext.request.contextPath}"/>
+<c:if test="${empty portalContextPath}">
+  <c:set var="portalContextPath" value="/"/>
+</c:if>
 
 <c:choose>
   <c:when test="${pageContext.request.userPrincipal != null}">
     <fmt:message key="login.label.Welcome"><fmt:param><c:out value="${pageContext.request.userPrincipal.name}"/></fmt:param></fmt:message><br>
-    <a href='<c:url context="${requestContext.request.contextPath}/" value="/login/logout"/>'><fmt:message
key="login.label.Logout"/></a>
+    <a href='<c:url context="${portalContextPath}" value="/login/logout"/>'><fmt:message
key="login.label.Logout"/></a>
     <br>
-    <a href='<c:url context="${requestContext.request.contextPath}/" value="/portal/my-account.psml"/>'><fmt:message
key="login.label.ChangePassword"/></a>
+    <a href='<c:url context="${portalContextPath}" value="/portal/my-account.psml"/>'><fmt:message
key="login.label.ChangePassword"/></a>
   </c:when>
   <c:otherwise>
     <%-- backdoor access to the portal session to get the login error count --%>
@@ -49,7 +52,7 @@
         </c:if>
       </c:otherwise>
     </c:choose>   
-    <form method="POST" action='<c:url context="${requestContext.request.contextPath}/"
value="/"/>'>
+    <form method="POST" action='<c:url context="${portalContextPath}" value="/"/>'>
       <table border="0">
       <tr>
         <td><fmt:message key="login.label.Username"/></td>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message