Sun Java System Portal Server 7 Developer Sample Guide

ProcedureTo Display the Total Number of Documents in the Search Result Status Message

In this procedures, Steps 1 and 2 are independent of each other. If desired, run the touch command after Step 1 to see the results.

Steps
  1. Modify results.jsp by changing the search status line to add the <search:getTotalDocuments/> tag.

    For example:


    <NOBR><B>Document matches <search:getFirstHit/> - <search:getToHit/> (of <search:getHitCount/>)</B> out of <search:getTotalDocuments/></NOBR><BR>

    This results in the following display:


    Document matches 1 - 6 (of 6) out of 37
  2. Change browseResults.jsp by adding the <search:getTotalDocuments/> tag to the search status.

    For example:


    <FONT color="<%=tFontColor%>" face="<%=tFontFace%>" size="-1"><b>Subcategories <search:getFirstHit/> - <search:getToHit/> (of <search:getHitCount/>)</B> out of <search:getTotalDocuments/></FONT><br>

    This results in the following display:


    Category matches 1 - 2 (of 2) out of 86
  3. Run the touch command.

    For example, type touch *.jsp.

  4. Reload the Desktop to verify the change.