Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.1-alpha-1
-
Component/s: Web interface
-
Labels:None
-
Complexity:Intermediate
-
Number of attachments :
Description
I see a lot of links constructed like this
<a href="${pageContext.request.contextPath}/deleteUser!doDelete.action?accountId=${pageScope.user.accountId}&username=${pageScope.user.username}"><ww:text name="delete"/></a>
This will break under certain circustancies, like cookies disabled or variables with some chars that need to be encoded
Also jstl automatically adds the contextPath at the beggining
See http://www-128.ibm.com/developerworks/java/library/j-jstl0318/#N105D3 for more info
The right way do do it is
<c:url var="deleteUserUrl" value="/deleteUser!doDelete.action">
<c:param name="accountId" value="${user.accountId}"/>
<c:param name="username" value="${user.username}"/>
</c:url>
<a href="<c:out value='${deleteUserUrl}'/>"><ww:text name="delete"/></a>
when no parameters need to be added it can just be
<a href="<c:url value="/deleteUser!doDelete.action">"><ww:text name="delete"/></a>
Henri, please take care of this.Fix it in trunk for the pages already there. I'll merge trunk to the branch later.