[ http://jira.codehaus.org/browse/DISPL-170?page=comments#action_42756 ] 

Christopher K Koenigsberg commented on DISPL-170:
-------------------------------------------------

The Struts "bean:write" tag has a nice attribute "filter" which defaults to 
"true" but can be explicitly set to "false", disabling any url encoding of the 
string...

perhaps a similar "filter=false" could be provided here too.


> Use of the TagConstants.AMPERSAND tag causes proxied displaytag hrefs to fail
> -----------------------------------------------------------------------------
>
>          Key: DISPL-170
>          URL: http://jira.codehaus.org/browse/DISPL-170
>      Project: DisplayTag
>         Type: Bug
>   Components: HTML Generation
>     Versions: 1.0
>     Reporter: Rick Herrick
>     Priority: Minor
>      Fix For: 1.1

>
>
> I have used displaytag to create a set of portlets that are hosted on a 
> Tomcat server and accessed through an Epicentric portal.  Some of these 
> portlets contain tables that are generated through displaytags.  The hrefs 
> that are generated on these tables end up with the href parameters separated 
> by "&".  This works OK as long as the hrefs are accessed directly.
> The problem is that, when the Epicentric portal (and most other portals) 
> access the portlet, it transforms the direct href into a parameter to a 
> portal-proxied href.  For example, in this particular case, an href that 
> appears as something like this:
> http://torahmdfmnzj21:8080/Promotions/detailList.do/detailList.jsp?param1=A&param2=B
> gets transformed into this:
> index.jsp?epiproxyrealurl=http%3a%2f%2ftorahmdfmnzj21%3a8080%2fPromotions%2fdetailList%2edo%2fdetailList%2ejsp%3fparam1%3dA%26param2%3dB
> The problem comes when displaytag generates sort links for table headings.  
> The bare href looks like this (note that I'm making these up, they're not 
> actual hrefs, just something similar):
> http://torahmdfmnzj21:8080/Promotions/detailList.do/detailList.jsp?d-2371270-o=1&d-2371270-s=2
> The devil comes with the "&" used as the parameter separator, which 
> results from using TagConstants.AMPERSAND in the Href.toString() method.  The 
> portal transforms this into:
> index.jsp?epiproxyrealurl=http%3a%2f%2ftorahmdfmnzj21%3a8080%2fPromotions%2fdetailList%2edo%2fdetailList%2ejsp%3fd-2371270-o%3d1%26amp;d-2371270-s%3d2
> This time when it posts back, that %26amp; doesn't get transformed into & 
> and then plain & by the browser.  Instead the ampersand performs its function 
> separating parameters, while the "amp;" becomes part of the following 
> parameter, meaning that you get a request parameter like this:
> amp;d-2371270-s
> Each time you click the link, it'll post back and the "amp;" accretes, 
> resulting things like:
> amp;amp;amp;amp;d-2371270-s
> The fact that "&" works as a parameter separator in the browser is 
> dependent on the fact that the browser will transform that properly.  In 
> fact, it is technically correct only to use the '&' directly in the URL.  The 
> TagConstants.AMPERSAND should either be changed to be "&" or '&' should be 
> used directly in the Href.toString() method, just as '?' and '=' are.

-- 
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



-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
displaytag-devel mailing list
displaytag-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to