This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

This Combination tested:#

(Latest versions of everything as at mid-December 2005)
  • Windows 2000 or XP
  • Java 1.5.0_06
  • JBoss 4.0.3 SP1
  • JSPWiki 2.3.57
  • Eclipse 3.1.1 and JBossIDE plugin. (Required for further jspwiki development only).

Assumptions#

  • You are already familiar enough with jboss to know how to get it up and running, and perform basic configuration tasks.

Preliminaries#

  • Remove log4j.jar from the jspwiki.war. This eliminates an error I was getting at startup time. (You want logging to be controlled by jboss log4j logger instance).
  • Comment out the line in jspwiki.properties that sets up the root logger. JBoss controls this, using its own conf/log4j.xml file.
#log4j.rootCategory=INFO,FileLog
  • Deploy the jspwiki.war contents to the correct jboss deploy folder. Recommend exploding the archive, although technically it does work either way. However, jboss will dynamically explode the war if you don't deploy in exploded form. This also means that any changes made to the UserDatabase, if you are using the default config, will be lost when the server is shut down.

Security#

  • By default, jspwiki uses an xml database for usernames, passwords and profile settings. This file is created automatically if necessary.
  • Have a good read of AuthorizationAndAuthentication2.3.

JAAS Security#

To enable jboss container (jaas) security is pretty straight forward:
  • Uncomment the section in WEB-INF/web.xml as denoted by the comments.
  • Comment out the <resource-ref> section at the bottom unless you are actually using the JDBCUserDatabase. Otherwise you will get a jndi error at server bootup which may prevent jspwiki from properly starting up.
  • The jspwiki.jaas file has to be converted into a jboss-style xml configuration, and appended to jboss's conf/login-config.xml. This will look like this:
    <application-policy name="JSPWiki-container">
      <authentication>
        <login-module  code="com.ecyrd.jspwiki.auth.login.WebContainerLoginModule"
          flag="sufficient"/>
        <login-module  code="com.ecyrd.jspwiki.auth.login.CookieAssertionLoginModule"
          flag="sufficient"/>
        <login-module  code="com.ecyrd.jspwiki.auth.login.AnonymousLoginModule"
          flag="sufficient"/>
      </authentication>
    </application-policy>

    <application-policy name="JSPWiki-custom">
      <authentication>
        <login-module  code="com.ecyrd.jspwiki.auth.login.UserDatabaseLoginModule"
          flag="required"/>
      </authentication>
    </application-policy>
  • Unless you've already changed it, by default JBoss will use a very simple authentication database consisting of two properties files. Add user names and passwords (in the clear) to conf/users.properties and roles to conf/roles.properties. Do not use usernames with embedded periods, as the period is a delimiter in the syntax of roles.properties.

Debugging with Eclipse 3.1.1#

I was able to set up the JBossIDE plugin for Eclipse, checkout jspwiki from the cvs repository, and build in the IDE using the ant script. I was then able to deploy the war file and start up debugging in the IDE. Set a breakpoint in either jsp files or other parts of jspwiki, and away it went! Under Windows, I had to ensure that the jdk\bin directory was on the path otherwise when the build script tries to launch jarsigner.exe it failed.

Add new attachment

Only authorized users are allowed to upload new attachments.
« This particular version was published on 17-Dec-2005 05:59 by MyTestUser.