The ATG platform includes a sample Web application that uses the search form handler classes. This application has six search form pages, one for each ATG Search query type (and thus each one using a different form handler). You can use the application for submitting test queries, or use the JSPs as starting points for building your own search pages. The application also includes sample Nucleus components of all of the form handlers and related classes described above.

Before you can use this sample application, you need to modify its SearchServer component to point to your ATG Search Routing instance. To do this, create an <ATG2007.3dir>/home/localconfig/atg/search/query/formhandlers directory, and in this directory create a file named SampleSearchServer.properties to set the properties of the component. See Configuring the ATG Platform to Issue Queries for information about the settings to use.

To run the sample application, you need to assemble an EAR file that includes the DAF.Search.Query.SearchTest module, and deploy this application on your application server. You can then access the application at:

http://hostname:port/search/search/index.jsp

See the ATG Installation and Configuration Guide for more information about the port number to use. For information about assembling applications, see the ATG Programming Guide.

Once the application is open in your browser, click the link for one of the query types. This opens a page that contains a form for constructing a query of that type. Fill in the form, and then click the Search button. The results of the search are displayed at the bottom of the page.

Note that neither the search forms nor the results output are intended to be realistic examples of how you would use these form handlers on an actual site. The forms enable you set search attributes that are rarely set by individual queries. In addition, the forms allow you to specify the attributes directly. In an actual search page, the form handler might set certain attributes, but the values used would typically be determined by logic implemented in the page or in methods of the form handler itself. For the results output, the pages simply display a table of the fields of the ATG Search Results object and their values. Obviously, on an actual site, the results would be displayed in a more usable (and selective) format.

 
loading table of contents...