The following comment has been added to this issue:

     Author: Ted X. Toth
    Created: Wed, 17 Nov 2004 4:51 PM
       Body:
I'm using the displaytag table in a portlet and I'm constructing a relative URL 
in the code I've included:

<%@ taglib uri='http://java.sun.com/portlet' prefix='portlet'%>

<%@ taglib uri="http://jakarta.apache.org/taglibs/display-el"; prefix="display" 
%>
<portlet:defineObjects/>
<%
  String currentTab = (String) 
(renderRequest.getPortletSession().getAttribute(VIDPortletEnums.TAB_ATTR));
        if (currentTab != null && !currentTab.equals(VIDTab.QUERIES))
                return;

    String renderURLString = renderResponse.createRenderURL().toString();
    String relativeURLString = 
renderURLString.substring(renderURLString.indexOf(renderRequest.getContextPath()));
        User user = 
(User)(renderRequest.getPortletSession().getAttribute(VIDPortletEnums.SESSION_USER));
        if (user != null) {
                pageContext.setAttribute("user", user);
        }

%>
<!--
Retreive all of the search status record and display them in the table.
-->
<table>
        <tr>
                <td>  <!-- add vidtabbedpane parameter to request URI 
VIDTab.QUERIES -->
                        <display:table name="${user.queries}" sort="list" 
pagesize="<%=10%>" requestURI="<%=relativeURLString%>" 
decorator="com.potomacfusion.webapps.portlets.QueryTableDecorator" >
                                <display:column property="queryName" 
title="Name" sortable="true" headerClass="sortable"/>
                                <display:column property="queryText" 
title="Query" sortable="true" headerClass="sortable"/>
                                <display:column property="status" 
title="Status" sortable="true" headerClass="sortable"/>
                                <display:column property="genVisDataStatus" 
title="Visualization&nbsp;Data" sortable="true" headerClass="sortable"/> 
                                <display:column width="40" property="actions" 
title="Actions" />
                                <display:setProperty name="sort.behavior" 
value="list" />
                                <display:setProperty 
name="paging.banner.placement" value="bottom" />
                                <display:setProperty 
name="paging.banner.include_first_last" value="true" />
                                <display:setProperty name="export.amount" 
value="list" />
                          <display:setProperty name="export.xml" value="false" 
/>
                          <display:setProperty 
name="export.excel.include_header" value="true" />
                                <display:setProperty 
name="paging.banner.items_name" value="Federated Search items" />
                        </display:table>
                </td>
        </tr>
        <c:if test="${user.queries != null}">

        <tr>
                <td>
      <input type='submit' value='Update' name='submitButton'>
                </td>
        </tr>
        </c:if>
        <c:if test="${user.queries == null} || ${user.queries.length == 0}">

        <tr>
                <td>
      Run Federated Search to create queries.
                </td>
        </tr>
        </c:if>
</table>
<input type='hidden' name='action' value='searchstatus'>

---------------------------------------------------------------------
View this comment:
  http://jira.codehaus.org/browse/DISPL-105?page=comments#action_26629

---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/browse/DISPL-105

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: DISPL-105
    Summary: https hrefs in Table get generated as http
       Type: Bug

     Status: In Progress
   Priority: Major

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: DisplayTag
 Components: 
             Tag Library
   Fix Fors:
             1.0 RC2
   Versions:
             1.0 RC2

   Assignee: fabrizio giustina
   Reporter: Ted X. Toth

    Created: Thu, 11 Nov 2004 5:29 PM
    Updated: Wed, 17 Nov 2004 4:51 PM

Description:
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.


---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to