!!!JSPWiki and Websphere Application Server 

First of all: All replaced or modified files can be found as backup in the attachment. 

!!Step 1 - Setting up your JSPWiki in Websphere 

Download the __Current beta release __ of JSPWiki from the [JSPWikiDownload] page and extract the downloaded zip archive to your local file folder. After that open your Websphere Application __Developer > File > Import__ and import the extracted JSPWiki.war file. 

[{Image src = 'import_step1.JPG' link ='import_step1.JPG'}] 

If you have sucessfully imported the JSPWiki war file, you will find there an Dynamic Web Project and an Enterprise Application called JSPWikiEar. After that you should deploy the JSPWikiEar to your Application Server and restart it. 

!!Step 2 - Configuring it up

!Classloader Configuration

In your Adminconsole go to __Applications > Enterprise-Applications > JSPWikiEar > Webmoduls__ as shown in the next picture. 

[{Image src = 'config_step2.JPG' width='640' link ='config_step2.JPG'}] 

In the following step click on the JSPWiki.war entry and set the Classloader for this Module on "__PARENT_LAST__". Click __Save __and also save your Masterconfiguration. The reason for this is that Websphere gets in trouble with an JSPWiki Library, called "jdom" (mentioned here [BugProblemsWithCommonLogging]) 

[{Image src = 'config_step3.JPG' width='640' link ='config_step3.JPG'}]

!Including all Libraries

The next important Step in your Admin Console is to include all needed Libraries. Therefore you go in__ Server > Application Server __ to your Application Server, where you have deployed the JSPWikiEar. 

After that go to __ Server > Applicationserver__ to your Application Server, where you have deployed the JSPWikiEar on. In the Configuration we need now the __Java- and Processmanagment > Processdefiniton__ to specify the correct Classpath. 

[{Image src = 'library_step4.JPG' width='640' link ='library_step4.JPG'}] 

Here you have to set up the Path to your JSPWiki.jar, which you will find in your WEB-INF/lib directory. 

[{Image src = 'library_step5.JPG' width='640' link ='library_step5.JPG'}] 

Click __OK __, also save your MasterConfiguration.

!JAAS Configuration (optional)

The next step is to set up the JAAS Configuration for the Login System. Therefore go to __ Security > Global Security > JAAS-Configuration__ and open your WEB-INF/jspwiki.jaas to add these lines to WebSphere.

[{Image src = 'config_step6.JPG' width='640' link ='config_step6.JPG'}]

First of all specify the Aliasname to "JSPWiki-Container" and add the lines from your jspwiki.jaas to this Alias.

[{Image src = 'config_step7.JPG' width='640' link ='config_step7.JPG'}]

JSPWiki-container {
  com.ecyrd.jspwiki.auth.login.WebContainerLoginModule    SUFFICIENT;
  com.ecyrd.jspwiki.auth.login.CookieAssertionLoginModule SUFFICIENT;
  com.ecyrd.jspwiki.auth.login.AnonymousLoginModule       SUFFICIENT;

[{Image src = 'config_step8.JPG' width='640' link ='config_step8.JPG'}]

Do the same steps now for "JSPWiki-custom".

JSPWiki-custom {
  com.ecyrd.jspwiki.auth.login.UserDatabaseLoginModule    REQUIRED;

Click __OK __, also save your MasterConfiguration and stop your Application Server for now.

!Policy Configuration (optional)

Finally we need to configure our Application Server to grant access to our Application and to load the specified Principal roles. We need to edit the server.policy of our Applicationserver, which we can found at __C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\profiles\default\properties\server.policy__ (Maybe your path will be different from mine).

We add now the following configuration:

grant {
  permission java.io.FilePermission "<<ALL FILES>>", "read, read, write, delete, execute";
  permission java.net.SocketPermission "*", "accept, connect, listen, resolve";
  permission java.util.PropertyPermission "*", "read";
  permission java.lang.RuntimePermission "modifyThreadGroup";
  permission java.lang.RuntimePermission "modifyThread";
  permission javax.security.auth.AuthPermission "modifyPrincipals";
  permission javax.security.auth.AuthPermission "doAsPrivileged";
  permission javax.security.auth.AuthPermission "getLoginConfiguration";
  permission javax.security.auth.AuthPermission "createLoginContext.JSPWiki-container";
  permission javax.management.MBeanServerPermission "findMBeanServer";
  permission javax.management.MBeanServerPermission "createMBeanServer";
  permission javax.management.MBeanTrustPermission "register";
  permission com.ibm.websphere.security.WebSphereRuntimePermission "AdminPermission";
  permission javax.management.MBeanPermission "*","registerMBean";
  permission javax.management.MBeanPermission "*","unregisterMBean";
  permission javax.management.MBeanPermission "*","getMBeanInfo";
  permission java.security.SecurityPermission "getProperty.login.configuration.provider";
  permission java.lang.RuntimePermission "getClassLoader";
  permission javax.security.auth.AuthPermission "createLoginContext.JSPWiki-custom";

After clicking __Save__ we can now start our Application Server.

__Note:__ I know that editing the server.policy isn't the right way in configuring up our installation, but WebSphere doesn't load own policy files, especially not when we set the grant to "java.security.AllPermission". Sure, there is a way to add a "was.policy" to our WIKI_EAR/META-INF/ folder but IBM's dynamic policy loader doesn't load principals.

!!Step 3 - Replacing Libraries 

Due some Bugs ([BugProblemsWithCommonLogging]) with JSPWiki and Websphere we have you replace the "[commons-logging-api.jar]" in your /WEB-INF/lib directory with the "[commons-logging-adapters-1.1.jar]" library, which you can find in the attachment. As a second "Replacement" we delete also the [xmlrpc.jar]. 

For now we have a clean installation with WAS and we can now start our Application server und configure our new JSPWiki version with the [http://localhost:9080/JSPWiki/Install.jsp] (Websphere Application Server's Port is 9080) 

!!Step 4 - Implementing Oracle as Database 

To get our new JSPWiki Installation compatible with Oracle we need the [JDBCProviders] Plugin, I used for this tutorial. The first few steps are quite simple now, because we can use the readme of the JDBC Package. 

First of all we need to copy the modified, attached [JDBCProvider.jar] file into JSPWiki's WEB-INF/lib directory and also the Oracle Driver to our WEB-INF/lib folder (I used [ojdbc14.jar|http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html] for that but you can also use the WebSphere implemented oracle driver for that. If you do that, you __don't__ need an extra archive). 

__Note:__ The modified [JDBCProvider.jar] only works with Oracle for now !!! Attachments will be stored as blobs and Wikipages as Clob.

After that step we copy [jdbcprovider.properties] and [jdbcprovider.oracle.properties] to our WEB-INF directory and replace the following entries in our jspwiki.properties file, which you can find in your WEB-INF directory: 

jspwiki.pageProvider = com.forthgo.jspwiki.jdbcprovider.JDBCPageProvider 
jspwiki.attachmentProvider = com.forthgo.jspwiki.jdbcprovider.JDBCAttachmentProvider 

After that step we create our required database with the [create_tables_oracle.sql] to finish the last step for migrating to Oracle. 

As final step, start your server and enjoy your JSPWiki with Oracle 10g.


You include a modified JDBCProvider.jar.  Where is the source code in case we need to fix something?

--Vincent, 17-Apr-2008


Sorry forgot to include that :) late but here it is: [jdbcprovider_src.zip]

--Alex, 01-Jan-2009