Sun Java System Portal Server 7 Developer Sample Guide

ProcedureTo Remove content-length from Search Results

Steps
  1. (Optional) Modify searchOnly.jsp file by removing content-length from the list of viewAttributes.

    The line to modify is the following:


    <search:setViewAttributes viewAttributes="hl-url,hl-title,hl-description,score,content-length,classification hl-classification"/>

    Remove content-length from this line.

  2. Modify results.jsp file by removing the line that displays the content-length.

    The line to modify is the following:


    <% } else if (formbean.getDescription().equals("full")) { %>
        <FONT size=-1 color=<%=tFontColor%> face=<%=tFontFace%>><search:getValue soifAttribute="hl-description" escape="false"/></FONT><BR>
        <FONT size=-1 color=#707070 face=<%=tFontFace%>><search:getValue soifAttribute="hl-url" escape="false"/><BR>
        <search:getValue soifAttribute="content-length" id="sz"/>
  3. Remove <search:getValue soifAttribute="content-length" id="sz"/> from this file.

  4. Run the touch command.

    For example, type touch *.jsp.

  5. Reload the Desktop to verify the change.