|
Capella's Java Wrapper for Swish
This page is dedicated to Capella's Java Wrapper for Swish. Read the short documentation below to know why this project has emerged and who we are.
Try it! | Download | Swish-e
|
1.Who is Capella?
2.What is this?
3.How does it work?
4.Files description
5.Requirements
6.Installation
7.Documentation / Links
8.Distribution
|
|
1.Who is Capella?
Capella Technologies is a Montreal (Quebec) based worker cooperative. That means
it is owned and managed by employees. We develop Web based solutions with Java/XML/XSL
for managing Web sites. Our flagship product is ED, a content management software.
|
2.What is this?
Swish.jsp uses Swish-e to dynamically generate XML from the search executed
on the indexes. When executing a search, the application will create the XML
structure based on the search parameters which are set in the config file. It
can be used as a generic search engine for any web site since it is fully
configurable.
Swish.jsp is the .jsp version of a servlet that is part of ED, Capella's Web
based content management software.
|
3.How does it work?
Swish.jsp will generate a search results page from the search parameters you define in the
swish.cfg file. When launched, it will generate the XML in a string and
transform it using an XSL file that matches the XML structure you are generating.
|
4.Files description
/swish.cfg (level: any/)
Configuration file for swish.jsp. This is where you set the search
parameters, the swish executable path, the XSL and DTD path, the search indexes, etc.
/searchg.xsl (level: any/)
This is the default layout for search.jsp, this file can be modified
depending on your search parameters.
/swish.dtd (level: any/)
Document Type Definition for the XML generated by swish.jsp. It also
contains the complete W3C list of HTML special caracters as entities.
This eleminates the errors when parsing special caracters.
/swish.jsp (level: any/)
This is the file that generates the XML and transforms it to generate the HTML
using the XSL. Unless you realy need to, you don't have to modify this file.
It is coded in Java and requires Apache Tomcat (or any servlet container) to be run.
/search.bat (level: any/ *optional file*)
This file contains a search command line that uses the default parameters of
the swish.cfg packaged with this application. Though it is not usefull to the
jsp, this file may be useful for those who are not familiar with Swish.
/swish.bat (level: websiteroot/)
This file contains a command line used to index a web site using swish-e
configuration file. It has to be placed in the root folder of the site since
it will index any child directory recursively. Note that you may have to
edit this file before using it.
/swish.config (level: swish-e config directory)
This file is an functional example of configuration parameters for swish-e. Note that you
can use your own configuration file.
|
5.Requirements
This application has been produced using Apache HTTP server and Tomcat 4.0
and we recommend their use.
However, you can use any other HTTP server or servlet container as long
as you make the proper setup.
You also need to install the following libraries.
See the end of the documentation to find the sites to download them.
| -jtidy | (htmlEncode / htmlDecode) |
| -jakarta oro | (Perl5Utils) |
| -xerces java 2 | (XML parser) |
| -xalan java 2 | (XSLT processor) |
|
6.Installation
- Installing Apache and Tomcat
First, you have to install Apache and Tomcat properly. We won't cover
the installation of these softwares here since they already have a lot of
documentation of their own.
- Installing swish-e
Follow the instructions included in the swish-e documentation to get it up
and running. Configure swish-e responding to your needs and create one catalog.
If you use swish.config and the batch files packaged with this application, a directory
called "catalog" is created next to site's root. If you wish to
modify this option, see the swish.config file.
- Install the java libraries
You will have to install some libraries in order to the application to run. Place them
in the lib directory of Tomcat (see Tomcat documentation).
| -jtidy | (htmlEncode / htmlDecode) |
| -jakarta oro | (Perl5Utils) |
| -xerces java 2 | (XML parser) |
| -xalan java 2 | (XSLT processor) |
The wrapper should work with any JAXP/TRaX libraries, however it has
been developped and tested only with Xerces 2.0 and Xalan 2.3.1.
Tomcat is distributed with older versions of these libraries,
if you need to upgrade them, they must be installed this way:
- Remove any older versions of xalan.jar and xerces.jar from
Tomcat's lib and common/lib directories
- Copy xerces.jar and xml-apis.jar from the Xalan distribution
to Tomcat's common/lib directory
- Copy xalan.jar from the Xalan distribution to Tomcat's lib directory
- Copy the files to their respective emplacement.
Following the files description, you should obtain something like this:
Example:
*/wwwroot/*/swish.jsp
*/wwwroot/*/swish.dtd
*/wwwroot/*/swish.cfg
*/wwwroot/*/searchg.xsl
*/wwwroot/swish.bat
*/catalog/something.index
*/swish-e/conf/swish.conf
* = any directory
|
7.Documentation / Links
Here is a list of good references about swish, Apache, Tomcat and the
libraries
|
8.Distribution
This application is free, you can use and modify it for any purpose.
It has been produced at the intention of the Swish-e community by
Capella Technologies (www.capella.coop (french)).
Programmers:
Jean-Michel David, technical director
Christos Karras, programmer
Jonathan Richard, programmer
|