Install WAP

From JWic

zelorgetb This document describes how to get the jWic WAP prototype and how to run it.

Contents

Setup Development Environment

We are currently using Eclipse 3.1 as IDE, Tomcat as Webserver with the Sysdeo Tomcat Plugin to control it and a MySQL database. It should be no problem to run the prototype in other environments, but this description depends upon the described environment.

If you don't have such an environment yet, you may read the setup a development environment article.

Download CVS Modules

The WAP project is yet only available at the jWic CVS Server:

Connection Type: pserver
Host:            www.jwic.de
Repository Path: /home/projects/jwic.wap
User:            Guest
Password:        <No Password>

To run the prototype, you must download all modules:

  • jwic.wap - The core platform
  • jwic.wap.community - Features often required by communities
  • jwic.wap.defaultsite - This plugin provides a 'default' layout and specifies the initial views
  • jwic.wap.doclib - The document library plugin
  • jwic.wap.doclib.wikiRenderer - The wiki based rendering engine for the document library
  • jwic.wap.imglib - The image library plugin
  • jwic.wap.plugin.filebrowser - Provides a browser to create folders and upload files

If you are using the Sysdeo Tomcat plugin, you should download and use the jwic.wap.dev project as your test web container. Users of the Eclipse WTP plugins should download and use jwic.wap.web as test container.

Other projects, that must be downloaded from the SourceForge CVS Server:

  • jWic - The main project.
  • jwic.ecolib - Additional controls, used by wap.

You must make sure that you have the latest version of jWic from the CVS HEAD in your workspace as jWic WAP is developed along jWic itself.

Setup Database

Create a database with the name wap on your MySQL server. Now start the webserver and run the jWic application 'dbupdate.xwic' in the wap.dev project. (http://localhost:8080/wap/wap/dbupdate.xwic).

Add the following mapping resources:

de/jwic/wap/security/standard/security.hbm.xml
de/jwic/wap/doclib/dao/hbn/DocLib.hbm.xml
de/jwic/wap/platform/file/hbn/FileService.hbm.xml
de/jwic/wap/directory/hbn/DirectoryService.hbm.xml

And hit the Create Tables button.

Before you can logon to the application, you must create a default user by executing the following SQL scripts on your database:

INSERT INTO `wap_user` VALUES ('Admin','098f6bcd4621d373cade4e832627b4f6');
INSERT INTO `wap_userperm` VALUES ('Admin','de.jwic.wap.admin.Admin');

The password for the user Admin is test.

Note: You can use any database that works with Hibernate. All you need to do is to modify the wapDataSource bean settings in the applicationContext.xml file. The file is located in the jwic.wap.dev module in the web/WEB-INF path.


Run the Prototype

Simply start the application using the following URL: http://localhost:8080/wap/wap/waptest.xwic

You can now logon using the user Admin and password test. Then click on 'Administration' to create new user accounts with additional rights.

To create new documents, follow these steps:

  • Change the perspective to Document-Editor
  • Click on Create Document
  • Enter a name and select the Wiki-Syntax renderer
  • You can enter text now. Links to other documents are specified like this: [Linked-Document]
  • Save the document

Troubleshooting

There might be some problems creating the tables on older mysql-server versions. In my case, it is a 3.23.52 version. I ran into a problem while creating relation tables with the key length. This can happen for the following wap tables:

  • wap_directory_attr
  • wap_groupuser

The tables will not be created, because of some kind of "key too long (500)" problem. To avoid that, or better, to complete the database structure, just create these two tables manually with the following attributes:

  • wap_directory_attr
    • USER_ID varchar(255) not null -> primary key
    • ATTRIBUTE varchar (245) not null -> primary key
    • VALUE varchar (255)
  • wap_groupuser
    • USERNAME varchar(255) not null -> primary key
    • GROUPNAME varchar(245) not null -> primary key

You can also update the hibernate mappings with the new 245 length for the two second key parts of the tables. They can be found in the jwic.wap project.

But as long as this is just a workaround for older mysql versions, you can work with it without updating the mappings.

Just keep in mind, not to use longer words than 245 in that special case. ;)

SourceForge.net Logo