ICISWiki/ICISSearchWebApp
From ICISWiki
ICIS Search Web Application Documentation
Overview
The ICIS Search Web Application is a Wicket Application which provides free text searching for ICIS. The application uses the ICIS Search project as the search engine. The look and feel of the application is based on the interface of Google. The Germplasm and Study details page were created to be the same as the pages in the Zeus web application. The search results included Germplasm and Study records.
Prerequisites
To work with the project, you should have knowledge in Java, Ant, Maven, Apache Tomcat.
Required Reading
• ICIS Search documentation
• ICIS DataSource documentation
• Wicket in Action
Project Dependencies
• ICIS Search
• ICIS DataSource
• Wicket dependencies
Please see the project’s pom file for details.
Directories
src/main/java – for Java codes and HTML files for pages used with Wicket
src/test/java – for JUnit tests
src/main/resources – for configuration files (ICIS DataSource config file, log4j config
file)
docs – documentation
src/main/webapp – for other resources used by the web app (web.xml, css files)
target – compiled classes, files for war archive, the war archive itself
xmls – maven files
Packages
org.generationcp.webapp.icissearch – contains the Application class
org.generationcp.webapp.icissearch.models – model classes used, includes simple
POJOs, Provider implementations, and IModel implementations
org.generationcp.webapp.icissearch.pages – Java files and HTML files for the pages of
the project
Java Classes
The classes have Javadocs and comments explaining their function and contribution to the project. The purpose of each class can be easily understood by someone who has read the specified required readings. The classes were written as simple as they can be and don’t contain complex logic.
Deployment
Below are the steps on how to deploy the web application:
1. Generate the Lucene index files. Refer to the ICIS Search documentation for steps on how to do this. The index files should be accessible by the Tomcat server where you will deploy the application (preferably on the same machine).
2. Configure the ICIS DataSource. In the src/main/resources folder, edit the ICISDataSource.xml file and change the database connection details as needed.
3. Configure ICIS Search. In doing step 1, you should have set the correct database connection settings. Now change the version number of the ICIS Search project (in the pom file) and run the minstall ant task. Changed the dependency of ICISSearchWebApp to the new version of ICISSearch.
4. Make sure that the application is set to “deployment” mode. This is toggled in the web.xml file in src/main/webapp/WEB-INF/. Change the “configuration” context parameter. The other mode is “development”, this modes are discussed in the Wicket in Action book.
5. Run the war ant task of the project. This will generate the war file for the web app under the target directory.
6. Deploy the war file to your Tomcat installation.
Notes:
• Run your Tomcat server with the max Java heap space set to 1024m or higher. Reading the Lucene index files require a big heap space.
• You can configure the logging for the application by chaging the setting in the log4j.properties file in src/main/resources folder.
Change Log
In the docs folder, there is a file called “ChangeLog”, containing logs of the changes to the project. Keep it updated always.

