maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brett Porter (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (CONTINUUM-783) Use standard jstl for links or they will break
Date Thu, 27 Jul 2006 21:39:32 GMT
    [ http://jira.codehaus.org/browse/CONTINUUM-783?page=comments#action_70941 ] 
            
Brett Porter commented on CONTINUUM-783:
----------------------------------------

while those no need to change the existing ones, you might like to use <ww:url/> for
the other links. It is basically the same, but let's you specify it in terms of namespace,
action and method.

> Use standard jstl for links or they will break
> ----------------------------------------------
>
>                 Key: CONTINUUM-783
>                 URL: http://jira.codehaus.org/browse/CONTINUUM-783
>             Project: Continuum
>          Issue Type: Bug
>          Components: Web interface
>            Reporter: Carlos Sanchez
>         Assigned To: Henry S. Isidro
>             Fix For: 1.1
>
>         Attachments: CONTINUUM-778-continuum-webapp.patch
>
>
> 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>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message