| By Sriram Natarajan, Marina Sum, Updated: June 20, 2007 |
As defined in Wikipedia, a wiki is "a type of Web site that allows users to easily add, remove, or otherwise edit and change some available content, sometimes without the need for registration. This ease of interaction and operation makes a wiki an effective tool for collaborative authoring." Literally hundreds of wiki implementations (engines) are available for download from the Internet. For the purpose of this series, we have randomly picked two such implementations, as follows:
This article, part 1 of a multipart series, explains how to set up, deploy, and configure JSPWiki to Sun Java System Web Server 7.0 (henceforth, Web Server 7.0), Sun's latest Web server release that is currently in technology preview. See this blog for a procedure on how to configure security in JSPWiki with Web Server 7.0.
Besides high-performance optimizations, Web Server 7.0 also includes a Web container that complies with JSP 2.0 and Servlet 2.4 specifications, an integral part of the J2EE 1.4 platform. Also included is a redesigned administration infrastructure with GUI and CLI support for managing both stand-alone and cluster-based installations.
For details on how to set up JSPWiki, see its documentation.
| - | Installing Web Server 7.0 |
| - | Installing JSPWiki |
| - | Deploying JSPWiki |
| - | Configuring JSPWiki |
| - | Making Web Server 7.0 Aware of Configuration Changes |
| - | Appendix: Advanced Configuration Files |
| - | References |
First, download the latest Technology Preview release of Web Server 7.0. For details, see its Installation & Migration Guide and this blog.
JSPWiki is released under the GNU Lesser General Public License (LGPL). Download the latest stable JSPWiki bundle, currently 2.2.33. The latest Beta release is 2.4.15.
Note: Both JSPWiki 2.2.33 and 2.4.15 Beta work well with Web Server 7.0. However, because JSPWiki is in continuous development, at the time you download, you might find a newer release that supersedes those two versions. As long as the release complies with JSP 2.0 and Servlet 2.4 specifications, it should work with Web Server 7.0.
For simplicity, this article assumes that you have downloaded and unpacked the JSPWiki binaries under /tmp for the UNIX or Linux platform and C:\tmp for the Windows platform.
To install JSPWiki:
% cd jspwiki-temp-dir % unzip JSPWiki-2.2.33-bin.zip winzip to extract JSPWiki-2.2.33-bin.zip into jspwiki-temp-dir. /JSPWiki directory. % cd jspwiki-temp-dir /JSPWiki % ls c:\> cd jspwiki-temp-dir \JSPWiki c:\> dir ChangeLog | JSPWiki.war | README |
JSPWiki=samplepages.zip | LICENSE | ReleaseNotes |
For an introduction and the installation procedures, read README and ReleaseNotes. Also, README briefly describes the steps for deploying JSPWiki with Apache Tomcat.
The JSPWiki.war file is the key file that enables wiki software like JSPWiki to be deployed on top of Web containers, such as Web Server 7.0, Sun Java System Application Server, or Apache Tomcat.
Deployment is the process through which you can host a Web application based on JSP pages or servlets on top of a Web container like Web Server 7.0. Each Web server has its own way of deploying a WAR file. In the case of Web Server 7.0, you can complete this process from either the command-line interface (CLI) or a GUI, the Admin Console. For simplicity, this article describes the process from the Admin Console.
Note: For the procedure from the CLI, see the Sun Java System Web Server 7.0 Administrator's Guide .
For an overview on how to deploy a Web application—that is, a WAR file, such as JSPWiki.war—on the Web Server 7.0 Admin Console, see this blog, which includes a live demo.
To deploy JSPWiki:
% cd ws7-install-dir % admin-server/bin/startserv /sun/webserver7 or /opt/sun/SUNwbsvr7. https:// hostname : portnumber, where: localhost for hostname. Figure 1: Web Server 7.0 Admin Console (Click image for larger view.) |
/JSPWiki. Click OK. Figure 2: Add Web Application Wizard (Click image for larger view.) |
Figure 3: Manage Web Applications Dialog Box (Click image for larger view.) |
Figure 4: Confirmation of Modifications in the Instance Configuration (Click image for larger view.) |
Figure 5: Configuration Instances Dialog Box (Click image for larger view.) |
Now configure JSPWiki: Go to http:// hostname : portnumber /JSPWiki/Install.jsp, where:
localhost to denote hostname. The mandatory options are displayed. See Figure 6.
Figure 6: Mandatory Options for JSPWiki (Click image for larger view.) |
To minimally configure the options so as to host a JSPWiki site:
/export/home/wiki-pages/. /sun/webserver/https- instancename /logs. Next, to ensure that JSPWiki authentication is understood within Web Server 7.0, append the following lines to the login.conf line in the /sun/webserver/https- instancename /config/login.conf file:
JSPWiki-container {
com.ecyrd.jspwiki.auth.login.WebContainerLoginModule SUFFICIENT;
com.ecyrd.jspwiki.auth.login.CookieAssertionLoginModule SUFFICIENT;
com.ecyrd.jspwiki.auth.login.AnonymousLoginModule SUFFICIENT;
};
JSPWiki-custom {
com.ecyrd.jspwiki.auth.login.UserDatabaseLoginModule REQUIRED;
};
|
Lastly, make the Web Server 7.0 instance and the Administration Server aware of the configuration changes.
Figure 7: Confirmation of Modifications to the Instance Configuration (Click image for larger view.) |
To verify that the configurations are correct, go to http:// hostname : portnumber /JSPWiki/Main.jsp. Figure 8 shows an example of the main page that is displayed.
Figure 8: JSPWiki Main Page (Click image for larger view.) |
Voilá! You have successfully set up and configured a JSPWiki-based site on top of Web Server 7.0.
If you deployed the JSPWiki.war file as described in the section "Deploying JSPWiki", jspwiki_webapp_dir, the location where the Administration Server expanded the JSPWiki.war file at deployment, is at ws7-install-dir /https- configname /webapps/ vsname /JSPWiki, where:
admin-server and https-*. The jspwiki.properties file resides under the jspwiki_webapp_dir /WEB-INF directory. That location is also displayed at http:// hostname : portnumber /JSPWiki/Install.jsp. All the changes that you make according to the section "Configuring JSPWiki" through Install.jsp eventually translate into the jspwiki.properties file. For any advanced JSPWiki tuning or setup, you most likely edit that file, too. As a convenience, the jspwiki.properties file contains many comments on how to edit the parameters. For details, see the JSPWiki documentation.
Every time you manually edit the parameters in the jspwiki.properties file, be sure to make the Web Server 7.0 instance and Administration Server aware of your manual changes to the JSPWiki application.
