Sun Java System Portal Server 7.1 Developer Sample Guide

Tips for Customizing the Service Providers

This section provides some basic tips for customizing the search and discussion providers.

Debugging the Service Providers

The Portal Server software provides files to help debug the Search and Discussion providers.

The following directory contains various search log files:


PortalServer-DataDir/searchservers/search1/logs

The following search log file records the search query sent to the Search Engine by the Search server:


PortalServer-DataDir/searchservers/search1/logs/rdm.0.0.log

Location of JavaServer Pages

JavaServer Pages for the Search channel are in the PortalServer-DataDir/portals/portal-ID/desktop/default/SearchProvider directory.

JavaServer Pages for the DiscussionLite channel are in the PortalServer-DataDir/portals/portal-ID/desktop/default/DiscussionLite directory.

JavaServer Pages for the Discussions channel are in the PortalServer-DataDir/portals/portal-ID/desktop/default/DiscussionProvider directory.

Modifying JavaServer Pages

When you modify statically included JavaServer Pages, be sure to run the touch command, otherwise no changes are reflected. You need to either run the touch command on the top-level JSP file or on all JSP files. For example,


touch searchContent.jsp

or


touch *.jsp

See also JavaServer Page Caching Information and Recompiling JSPs.

Accessing Channels Directly

You can access the search channel directly at the following URL:


http://server:port/portal/dt?provider=JSPDynamicSingleContainer&JSPDynamicSingleContainer.selectedChannel=Search&last=false&action=content

Modify all the links to use these extra parameters in the URL. For example, edit searchMenu.jsp file as follows:


<nobr>&nbsp;&nbsp;<a class=noUnderline href="<%=dpurl%>?mode=basic">Basic Search</a>&nbsp;&nbsp;</nobr>

Replace the bold portion with:


http://server:port/portal/dt?provider=JSPDynamicSingleContainer&JSPDynamicSingleContainer.selectedChannel=Search&last=false&action=content

You can access the Discussion channel directly at the following URL:


http://server:port/portal/dt?provider=JSPDynamicSingleContainer&JSPDynamicSingleContainer.selectedChannel=Discussions&last=false&action=content