[ http://jira.codehaus.org/browse/DISPL-105?page=all ]
     
fabrizio giustina closed DISPL-105:
-----------------------------------


Marking fixed issue as closed.

> https hrefs in Table get generated as http
> ------------------------------------------
>
>          Key: DISPL-105
>          URL: http://jira.codehaus.org/browse/DISPL-105
>      Project: DisplayTag
>         Type: Bug
>   Components: Tag Library
>     Versions: 1.0 RC2
>     Reporter: Ted X. Toth
>     Assignee: fabrizio giustina
>      Fix For: 1.0

>
>
> If you are on a secure page generated links like sortable column headers 
> aren't generated as https but rather http. This only occurs as far as I know 
> on WebLogic on Windows. In TableTag.java in the initHref method I've added 
> some code to fix this problem:
> protected void initHref(RequestHelper requestHelper)
>     {
>         // get the href for this request
>         Href normalHref = requestHelper.getHref();
>         if (this.requestUri != null)
>         {
>             // if user has added a requestURI create a new href
>             // call encodeURL to preserve session id when cookies are disabled
>             String encodedURI = ((HttpServletResponse) 
> this.pageContext.getResponse()).encodeURL(this.requestUri);
>                       // Added as work around for WebLogic
>                       StringBuffer encodedURIBuf = new 
> StringBuffer(encodedURI);
>               if (((HttpServletRequest) 
> this.pageContext.getRequest()).getScheme() == "https" && 
> !encodedURIBuf.toString().startsWith("https")) {
>                               encodedURIBuf.replace(0, 4, "https");
>                               encodedURI = encodedURIBuf.toString();
>               }
>             this.baseHref = new Href(encodedURI);
>             // ... and copy parameters from the current request
>             Map parameterMap = normalHref.getParameterMap();
>             this.baseHref.addParameterMap(parameterMap);
>         }
>         else
>         {
>             // simply copy href
>             this.baseHref = normalHref;
>         }
>     }
> I don't care if you use this code as long as it gets fixed and I don't have 
> to patch each release.

-- 
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 JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
displaytag-devel mailing list
displaytag-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to