-------------------------------------------------------------------------------- Readme for the XML Gateway simple search servlet -------------------------------------------------------------------------------- The XML Gateway Simple Search Servlet is a sample application that uses the Insight XML Gateway. Both the source code and support files are provided as a foundation upon which you can build. This sample application is an example and is not a supported product, please see the LICENSE.txt for more information. -------------------------------------------------------------------------------- Introduction: -------------------------------------------------------------------------------- The simple search servlet uses a Java Servlet, XSLT, and CSS. It consists of a series of XML Template files, HTML files, images, and libraries to run the servlet. -------------------------------------------------------------------------------- Directory Structure: -------------------------------------------------------------------------------- /simpleSearch |- lib |- src | |- java/com/luna/insight/projects/xmlgateway <-- the directory where the | | servlet's source is stored | |- config <- where the web.xml, search templates, and other | | configuration files are stored | |- images <- where source images are stored including the PSD file for | the background |- build <- once deployed where the final version of the servlet lives | with all of the config files in the correct location |- classes <- where temporary files are stored during compile time |- build.xml <- the ant build script used to compile, and deploy the servlet -------------------------------------------------------------------------------- Compiling and Deploying the Simple Search Tool: -------------------------------------------------------------------------------- The SimpleSearch servlet has been deployed with an ANT script to build, and deploy the servlet. To use this script, you must have ANT 1.6.1 installed as well as the Sun 1.4.2 JDK. Cleaning the Build Environment: run "ant clean" Compiling the servlet: run "ant compile" Deploying the servlet: run "ant deploy" -------------------------------------------------------------------------------- Installing the Servlet: -------------------------------------------------------------------------------- To install the simple Search tool: 1. Build & deploy the servlet if you haven't already 2. Locate the Installation directory for Insight 5.x server components. 3. Identify the full URL for your version of the Insight XML Gateway. Commonly this will be the same PORT & HOSTNAME as is used for BrowserInsight, with the path /insight/servlet/XMLGateway . i.e. http://TOMCAT_HOST:TOMCAT_PORT/insight/servlet/XMLGateway 4. Locate the web.xml file for the SimpleSearch tool within the "build/servlet/WEB-INF" directory. 5. Open the "web.xml" file in a text-edtior 6. Locate the following lines: gatewayURL http://localhost:8081/insight/servlet/XMLGateway 7. Change "http://localhost:8081/insight/servlet/XMLGateway" to be the URL for your XML Gateway 8. Save the web.xml File 9. Make a "simpleSearch" directory at the root of your 5.x installation directory. 10. Copy the "servlet" directory from the "build" directory to the Installation Directory for the Insight 5.x server components. 11. Locate the "Tomcat\conf\Catalina\localhost" directory within your Insight 5.x server components installation. 12. Open the "simpleSearch.xml" file in a text editor. This file represents the Tomcat Context 13. Locate the following line: docBase="/path/to/servlet/base_dir" 14. Replace the "/path/to/servlet/base_dir" with the full directory path to the serlvet Directory. If you had copied the simpleSearch Directory to "c:\Program Files\LunaImaging\5.0\", the line would read: docBase="c:\Program Files\LunaImaging\5.0\simpleSearch\servlet". 15. Save the simpleSearch file. 16. Copy the "simpleSearch.xml" context file from the "build" directory to the "Tomcat\conf\Catalina\localhost" directory. 17. Restart Tomcat 18. Once Tomcat has started, load the following page "/insight/sample/simpleSearch" on your tomcat server.