Current development on JAMWiki is primarily focused on maintenance rather than new features due to a lack of developer availability. If you are interested in working on JAMWiki please join the jamwiki-devel mailing list.

Configuration

ktip.png Please contribute to the JAMWiki project by helping to improve this article. Add to or expand some of the existing information, fix an error, or share your own knowledge to improve this subject! Don't worry about making mistakes - there will always be someone who can correct any errors later.

JAMWiki configuration provides the ability to change system settings, handle spam, manually address server issues, and perform other needed tasks.

Contents

Customizing Look and Feel[edit]

Most site administrators will want to immediately change the look & feel of their wiki. There are four topics that directly affect the look and feel of the wiki, and each of these are by default editable only by the site administrator:

  • JAMWiki:Custom.css - The user-customizable CSS style sheet. Modifying this stylesheet requires at least a minimal knowledge of Cascading Style Sheets. This stylesheet extends JAMWiki:System.css, which is the system CSS stylesheet that should not be modified. In JAMWiki versions prior to 1.2 these two files were named "StyleSheet".
  • JAMWiki:Sidebar - The left navigation menu. In JAMWiki versions prior to 1.2 this file was named "LeftMenu".
  • JAMWiki:Footer - The footer. In JAMWiki versions prior to 1.2 this file was named "BottomArea".
  • JAMWiki:Header - A header that can display messages at the top of every page. This file is only available in JAMWiki 1.2 or later.
  • StartingPoints - The default front page for the wiki.

Other aspects of the site's look and feel, including the default logo, can be modified by an administrator using the Special:Admin tools.

Configuration Settings[edit]

Most JAMWiki configuration settings are available from the Special:Admin tools. Admin users can access these tools by clicking on the "Admin" link which appears at the top of the screen, or by visiting the Special:Admin topic. The following configuration settings are available:

General options[edit]

File-system directory
An existing directory in which JAMWiki system files can be stored. Information stored in this directory include the system cache, the search index files, and HSQL database files when JAMWiki is used without an external database.
Server URL
The base URL for the installation, such as http://www.example.com. This value is set automatically during installation and used with the {{SERVERNAME}} magic word and when generating absolute URLs.
Site Name
The name of the site. This value will be appended to all page titles ("Page Name - Site Name") and used in XML exports - for example, the title of this page is "Configuration - JAMWiki Java Wiki Engine". Note that HTML should not be used in the site name.
Logo image
The default wiki image that appears on the top of the left-navigation bar on all pages. The image name must be relative to the /images folder found in the root wiki install directory, and the file must exist in that directory. As an example, on http://jamwiki.org/ the logo image is specified as logo_oliver.gif< and the path to the image is http://jamwiki.org/wiki/images/logo_oliver.gif.
Default number of recent changes displayed
The number of results to display by default on Special:RecentChanges. Users have the option to display more or less changes using a drop-down. Increasing this value to a very large number can negatively affect performance.
Display "Preview" edit button
It is helpful to editors to allow them to preview their changes before saving. This setting allows administrators to disable the preview option if desired.
Display "Show Changes" edit button
Flag indicating whether or not the edit screen should include a button to allow users to view a diff of their current edit against the current topic version. This option exists primarily for sites that used that have upgraded from versions older than JAMWiki 0.8.0 and want to maintain the same edit screen look & feel.
Default editor
Provides the option to select an editing toolbar for editors that makes utilizing wiki syntax easier. Alternatively, if no editor is selected then the toolbar will not be displayed. In the future additional editors may be offered.
HTML meta description
The HTML meta description is a description of a wiki page that can be used by search engines and other tools to describe a page. Variables that can be used in the meta description include: {0} page topic (may be empty)
Search engine
It is possible to use any search engine with JAMWiki as long as an configuration for that search engine is created that implements the org.jamwiki.SearchEngine interface. Out of the box JAMWiki ships with Lucene integrated, and that is the default search engine option.
Default topic
The name of the default topic for new virtual wikis. The default topic is the topic shown when the root page of the wiki (such as http://jamwiki.org/wiki/en/) is requested. By default this value is StartingPoints. Note that to change the default for an existing virtual wiki the Special:Maintenance page provides a list of existing virtual wikis and their default topics.
Topic version export limit
The maximum number of revisions that may be included in a topic export. A larger value allows the full history of most topics to be exported, but may cause excessive use of system resources. A smaller value prevents exporting the full topic history but also prevents the export process from using excessive system resources.
Date and time pattern
Pattern to use for display of dates that include day, month, year, hour and minute. Date patterns must follow the format used by the java.text.SimpleDateFormat class. "SHORT", "MEDIUM", "LONG" and "FULL" may also be used to invoke the corresponding SimpleDateFormat constant value.
Date-only pattern
Pattern to use for display of dates that include day, month and year, but do not include hour or minute. Date patterns must follow the format used by the java.text.SimpleDateFormat class. "SHORT", "MEDIUM", "LONG" and "FULL" may also be used to invoke the corresponding SimpleDateFormat constant value.
Time-only pattern
Pattern to use for display of dates that hour and minute but not day, month or year. Date patterns must follow the format used by the java.text.SimpleDateFormat class. "SHORT", "MEDIUM", "LONG" and "FULL" may also be used to invoke the corresponding SimpleDateFormat constant value.

Parser settings[edit]

Parser
JAMWiki supports the use of different Wiki syntax engines. The default parser implements the Mediawiki syntax.
Allow HTML
By default HTML tags may be used in topics, but for wikis that need higher levels of control this option can be disabled.
Allow Javascript
Allowing Javascript opens up a wiki to cross-site scripting attacks and other potential issues, and Javascript is disabled by default. This option should only be enabled when wiki editors can be trusted not to create malicious content.
Allow Wiki templates
JAMWiki allows the use and creation of Mediawiki templates unless this option is disabled.
Open printable page links in new window
By default when the "Print" tab is chosen a print-friendly version of the topic opens in the same window. This option will open the print-friendly version in a new window.
Open external links in new window
By default when a link within a wiki topic is clicked that leads to an external site the link opens in the same window. This option will open the link in a new window.
Use table of contents
When a topic contains at least three headings then a table of contents will be displayed with the article unless this option is de-selected.
Maximum table of contents depth
Set this value from 1-6 to determine how much nesting is allowed within a topic's table of contents.
Allow capitalized topic names
Treat capitalized and lowercase topics as the same value. If this option is not selected then "Topic" and "topic" are treated as two different records. Note that even if this option is enabled it is still possible to create two topics that vary only in capitalization, in which case the records will be treated as two distinct topics.
Display interwiki links inline
If this option is selected then all interwiki links will be displayed inline with article text. If it is not selected then interwiki links will be displayed in a box in the left navigation (links preceded by a colon such as "[[:interwiki:Topic]]" will always be displayed inline).
Display virtual wiki links on Special
pages
If a wiki has multiple virtual wikis then selecting this checkbox will automatically generate a box in the left nav on pages such as Special:RecentChanges that will display links to virtual wiki-specific versions of the Special: page.
Display virtual wiki links inline
If this option is selected then all virtual wiki links will be displayed inline with article text. If it is not selected then virtual wiki links will be displayed in a box in the left navigation (links preceded by a colon such as "[[:virtualwiki:Topic]]" will always be displayed inline).
Image resize increment (pixels)
When uploaded images are displayed on the wiki a maximum width/height value may be specified, such as [[Image:Example.jpg|300px]]. JAMWiki will specify the selected width/height value in the generated HTML image tag, but a resized copy of the original image will only be created if the specified width/height is more or less than the specified pixel increment. Decreasing this value will improve image display quality but it can have significant performance impact as image resizing is a resource-heavy process.
Pattern for user name in signatures
This option controls how default user signatures (~~~~) will be displayed, although users can overwrite these settings form their preferences. Key: {0} = user page; {1} = user contributions page; {2} = user comments page; {3} = user login; {4} = user display name; {5} = user email; {6} = user id
Pattern for dates in signatures
This option controls how dates will be displayed. The pattern should follow the format used for the Java SimpleDateFormat.

Persistence settings[edit]

Persistence
Selecting "Internal Database" will cause a version of the HSQL database to be installed and used by JAMWiki for data storage. "External Database" indicates that the system administrator will use a separate database that is not installed by JAMWiki.
Database type
When using an external database this value indicates the database type. If your specific database is not listed then selecting "ansi" will utilize an ANSI SQL compliance mode that should work with most databases.
JDBC driver class
When using an external database this value is set to the JDBC driver class. See your database documentation for information on what value to use.
Database URL or JNDI DataSource name
When using an external database this value indicates the JDBC URL. See your database documentation for information on what value to use. Alternatively this field may be used to specific a JNDI datasource for systems using JNDI database connections.
Database Username
When using an external database this value indicates the database user login. The user account must have permission to create and modify tables.
Database Password
When using an external database this value indicates the password for the database user login.
Max number of active connections
When using an external database this value specifies the maximum number of database connections that can be opened. For smaller wikis the default value should be sufficient.
Max number of idle connections
When using an external database this value specifies the maximum number of database connections that can be idle before being released. A negative value indicates an unlimited number of idle connections. For smaller wikis the default should be sufficient.
Test connections on borrow
When using an external database this value specifies whether or not to test a database connection when it is retrieved from the connection pool. If the connection fails validation it will be returned to the database and a new connection will be retrieved. Selecting this option may improve wiki reliability while disabling it may offer a very small performance improvement.
Test connections on return
When using an external database this value specifies whether or not to test a database connection when it is returned to the connection pool. Selecting this option may improve wiki reliability while disabling it may offer a very small performance improvement.
Test idle connections
When using an external database this value specifies whether or not to test a database connection when it has been unused for a length of time. Selecting this option may improve wiki reliability while disabling it may offer a very small performance improvement.
Min idle eviction time
When using an external database this value specifies the minimum amount of time (in seconds) a connection may sit in the connection pool before it is considered a candidate for idle connection eviction. If this value is negative then connections will never be evicted solely for being idle.
Time (in seconds) between eviction runs
When using an external database this value specifies the minimum amount of time a connection may sit in the connection pool before it is tested to ensure that it is still valid. If this value is negative then connections will never be evicted solely for being idle.
Number of tests per eviction run
When using an external database this value specifies the sets the max number of objects to examine during each run of the idle object evictor thread (if any). In general the default value should be a good selection for most setups.
Action to take when pool is exhausted
When using an external database this value indicates what the system should do when trying to retrieve a connection when the connection pool is exhausted. "Grow" indicates that a connection should be created, "Block" indicates that the system should wait for a connection to become available, and "Fail" indicates that an error should be thrown.
Pool prepared statements
Pooling prepared statements improves performance but may be disabled if a database manages its own prepared statement connection pooling.
Max number of open prepared statements
This parameter only has an effect when prepared statements are pooled. A larger value may improve performance but will use more system resources and could cause a database connection to run out of cursors. Any non-positive number will allow unlimited pooled prepared statements.

File upload settings[edit]

Maximum upload filesize (KB)
The maximum allowed size for files uploaded to the wiki by users. If a file is uploaded that exceeds this size an error will be returned and no record will be created in the wiki. A value of -1 indicates that no maximum is set.
File upload directory
The directory on the filesystem in which to store uploaded files, and from which files will be downloaded. This directory MUST be accessible either to the web server or to the application server since uploaded files will be served from here.
Relative file upload root
Relative path from the file system doc root that will be used in <img> and <a> tags. For example, if the file upload directory is /docroot/wiki-files/, then the relative path is /wiki-files/.
File server URL
The base URL for the server that will be hosting images and files, such as http://www.example.com. This value is set automatically during installation and will almost always be the same as the file server URL value, unless the site is hosting images from a separate server. This value is use by the {{filepath:}} parser function and in absolute image URLs.
Shared file repository
A shared file repository allows use of files and images from the specified virtual wiki to be utilized on all virtual wikis. For example, if a JAMWiki instance has three virtual wikis "a" "b" and "c", and "a" is a shared virtual wiki then any image file present on "a" can also be used on "b" and "c" as if it had been uploaded directly to that virtual wiki.
Allowed file upload types
JAMWiki allows file uploads to be blocked using either a whitelist or a blacklist if desired. A whitelist will allow only uploads of file types that are listed on the whitelist, while a blacklist will allow uploads of any type except for those listed on the blacklist.
Upload blacklist
When using a blacklist, this list contains file extensions for file types that may NOT be uploaded to the wiki, separated by commas. Example: "jsp,bin,bat". The list is case-insensitive.
Upload whitelist
When using a whitelist, this list contains file extensions for file types that may be uploaded to the wiki, separated by commas. Example: "jpg,gif,txt". The list is case-insensitive.

Spam settings[edit]

Enable spam filter
By default JAMWiki will use a regular-expression based spam filter to block some edits - see the section on spam handling below for details. This checkbox provides an option to disable the spam filter.
Use Captcha for topic editing
Enable captcha support for combatting spam - valid options are "Never", "Un-registered users only" and "Always". Captcha is a type of challenge-response test used in computing as an attempt to ensure that the response is generated by a person. See http://code.google.com/apis/recaptcha/ for additional details.
Use Captcha for user registration
Enable captcha support for combatting spam - valid options are "Never" and "Always". Captcha is a type of challenge-response test used in computing as an attempt to ensure that the response is generated by a person. See http://code.google.com/apis/recaptcha/ for additional details.
ReCAPTCHA public key
ReCAPTCHA public and private keys are required for using ReCAPTCHA and must be generated at https://www.google.com/recaptcha/admin/create.
ReCAPTCHA private key
ReCAPTCHA public and private keys are required for using ReCAPTCHA and must be generated at https://www.google.com/recaptcha/admin/create.

E-Mail settings[edit]

The mail support is available since JAMWiki version 1.3.x and requires an accessible SMTP server and a mail account on that server that can be used to send mails. There are two sections:

  • E-Mail server settings: contains a flag to enable mailing altogether and to configure your SMTP server. Additionally there is a button that can be used to test the configuration. In order to use this, the logged in admin must have configured an E-Mail address in his account.
  • E-Mail services: A set of services, each containing a flag to enable the service and where this applies, entry fields for service configuration.

E-Mail server settings[edit]

The following information changes for all installation. Ask your mail service provider which parameters you must use. These are the same settings that you would use to configure your E-Mail client for that server.

Enable E-Mail service
This flag enables mail services altogether. You will need to click this first in order to configure server information.
Mail server requires authentication
Some servers require authentication for sending mails. If this is the case for your server check this box.
Use SSL
Some servers require an encrypted connection using SSL (e.g. gmail.com). Check this box if this is the case.
Host
The name of the host.
Port
The port number. Default is 25, but particularly secured SMTP servers may use an alternative value.
Username
The username for your account. This is often the same as the E-Mail address.
Password
The password for authentication of your account. This value is only needed if the server requires authentication.
Reply address
The address that will appear in the FROM field of the recepient's mail client.
Default content type
Default is set to text. If a developer wishes to use a more appealing format, then switch to html.
Address separator
The character used to separate mail addresses of recipients, if these are passed in a single string.
Button "Send test mail"
This will send a mail to the admin currently logged in on the wiki. It only works if you configured the E-Mail address in your account. If you are sure about your settings and don't want to test it, you can simply click on the "save" button. It is not mandatory for the admin to configure an E-Mail address for letting users have access to the service. Anyhow think that you may forget your password, too.

E-Mail services[edit]

Password reset[edit]
Enable password reset
Enable this service. Checking this box only will work if the mail service altogether is enabled (see E-Mail server settings).
Challenge validity timeout
The number of minutes that the challenge sent to the user by mail must be valid. If the user tries to use the link in his mail after this number of minutes, he will receive an error message. The counting starts from the timestamp of the request.
Number of requests before IP locking
In order to avoid spamming you can define the number of requests that are allowed from the same IP. If this number is reached, then the system refuses sending additional mails to the user until the duration of the IP locking is reached.
Duration of IP locking
The number of minutes that the system must refuse the service to the locked IP. The counting start at the timestamp of the last request.

Other settings[edit]

Maximum number of cached elements
The maximum number of elements that can be cached in memory for all caches. A larger value improves performance but increases system memory usage. For most setups the default should be acceptable.
Maximum number of cached elements per cache
The maximum number of elements that can be cached in memory for any specific cache. A larger value improves performance but increases system memory usage. For most setups the default should be acceptable.
Maximum cache element age (in seconds)
The maximum length of time that a value can be kept in the cache before being evicted.
Maximum cache element idle age (in seconds)
The maximum length of time that a value can remain unaccessed in the cache before being evicted.
Provide RSS feed
This option enables an RSS feed for recent changes on the wiki.
RSS feed title
The title used for the RSS feed.

Hidden preferences[edit]

Several advanced preferences cannot be modified through the GUI interface, but if necessary system administrators can modify these properties directly by changing values in the /WEB-INF/classes/jamwiki.properties file. These properties include:

pattern-valid-login
This value controls what is a valid regular expression pattern for a user logins. Sites using LDAP may want to change this value to (for example) allow logins with periods in them. The value is a Java regular expression, meaning all regex characters must be double escaped; for example:pattern-login-valid=([A-Za-z0-9_\\.]+).
pattern-topic-name-invalid
This value controls what characters cannot be used in topic names. The value is a Java regular expression, meaning all regex characters must be double escaped; for example:pattern-topic-name-invalid=([\\n\\r\\\\<>\\[\\]?\#]+).
pattern-role-name-invalid
This value controls what characters can be used in wiki role names; for the most part sites should not need to change this value unless roles are being retrieved from an external system. The value is a Java regular expression, meaning all regex characters must be double escaped; for example:pattern-role-name-invalid=([A-Za-z0-9_\\.]+).
parser-max-inclusions
[JAMWiki 0.9.3 or later] This value limits how many inclusions (example: {{topic}}) are allowed for a topic in order to prevent infinite loops. By default it is set to 250.
parser-max-iterations
[JAMWiki 0.9.3 or later] This value limits how deeply the parser will descend to process wiki syntax in order to avoid infinite loops. For example, an image may include wiki text in its caption, resulting in a second parser iteration to process. By default it is set to 100.
parser-max-template-depth
[JAMWiki 0.9.3 or later] This value controls how deeply the parser will nest while processing templates. Since any template may include another template this value eliminates the potential for infinite loops. By default it is set to 100.
parser-infinite-loop-limit
[JAMWiki 1.0.0 or later] If an infinite loop is detected while parsing a topic then the tag that caused the infinite loop will abort and parsing will continue. This parameter controls how many infinite loops can be detected before parsing of the topic aborts completely. By default it is set to 5.

User Permissions / Roles[edit]

There are three ways in which permissions are handled in JAMWiki:

  • Special:Roles. This JAMWiki administrative interface allows sysadmins to specify what user rights are required to perform specific actions, such as editing, uploading, etc.
There are two groups that are managed by the system:
* GROUP_ANONYMOUS: All users
* GROUP_REGISTERED_USER: Users that hava a valid login on the wiki
You can assign and revoke permissions to these groups, but you cannot assign users to them. All not logged in users will be assigned automatically to GROUP_ANONYMOUS and all logged in users will be assigned to GROUP_REGISTERED_USER.
If this type of granularity is not enough for your access control concept you can:
* Assign and revoke permissions directly to users
* Create a new group, assign it permissions and users
The Special:Roles user interface supports you in all these operations. Since you may assign permissions directly to users or through a group membership, the tool shows a red background if a user has a permission through group membership. Direct permissions are shown as checked boxes. A user can have a permission at the same time directly and through a group.
  • Special:Manage. For every topic, and admin can limit the topic to be editable only by admins, or by no one at all.
  • Spring Security. This authentication and authorization framework is used for controlling specific topic permissions, user authentication, and other basic capabilities.

For basic installations the Special:Roles and Special:Manage capability should be sufficient for managing user rights. Installations with more advanced needs, such as integrating with LDAP or restricting access to specific topics, should review the more advanced Spring configuration details on the Permissions page.

System Maintenance[edit]

The Special:Maintenance page provides additional options to site administrators for performing tasks such as manually clearing the cache, reloading spam patterns, etc. The options available on this page are:

Add Virtual Wiki
Create a new virtual wiki. This option will simply create the database record for the virtual wiki - the /WEB-INF/web.xml file must also be modified to add a servlet-mapping entry for the virtual wiki, and the application server must then be restarted for the virtual wiki to become active. Additionally, existing virtual wikis can be managed from this interface, including the ability to change the default topic (normally StartingPoints) to another value.
Rebuild Search Index
The search engine index should be automatically kept up-to-date, but if a topic is manually changed in the database or a server problem occurs this button provides a way of parsing all topics on the wiki and rebuilding the search index.
Reload Recent Changes
The results on the Special:RecentChanges page are updated automatically, but this button provides a way of forcing those values to be reloaded in the case of a system problem or other issue.
Clear Cache
For performance reasons JAMWiki caches data on disk. The cache is updated automatically, but this button provides a way to force a reload in case of system problems.
Reload Spam Filter Patterns
The spam filter uses a list of regular expressions in the /WEB-INF/classes/spam-blacklist.txt file to block edits containing spam patterns. When that file is updated either the application server must be restarted or else this button should be clicked to activate any changes.
Reset User Password
This functionality allows wiki system administrators to reset a user's password by entering the login, new password, and a confirmation of the new password. The user's password will be immediately changed to the new value. This feature was released with JAMWiki 0.6.6.
Export Internal Database to CSV
(Experimental) This option is only available for wikis that are setup to use the "internal database" setting, and provides a way to export the contents of that database to CSV files. The exported files will be available in the "database" directory found within the wiki's file-system directory (see Special:Admin for that setting). This feature was released with JAMWiki 0.6.6.
Migrate Wiki to new Database
(Experimental) Wiki system administrators may choose to migrate all data in the wiki from one database to another. This command will create the required tables in the new database and then copy data from the old database to the new database, and will finally update the wiki setup to point to the new database. This feature was released with JAMWiki 0.6.6 and feedback on success or failure is appreciated.

Translations[edit]

All labels in JAMWiki (such as page titles, button labels, etc) can be translated into different languages. Translations can be added to JAMWiki either by manually creating or updating an appropriate "ApplicationResources.properties" file in the /WEB-INF/classes directory of the JAMWiki installation, or more easily by using the Special:Translation tool (admin only). Note that when using the Special:Translation tool, the web application server must be restarted for new translation values to appear on the site. Individuals creating or updating translation files are encouraged to submit them back to the JAMWiki project so that they can be included in future releases - please leave a message on the Feedback page if you are interested in contributing translations.

Virtual Wikis[edit]

Virtual wikis provide the capability to have multiple wikis running on the same application server without creating new webapp instances. For example, if JAMWiki is running on http://jamwiki.org/wiki/ it will by default create a virtual wiki "en" that will be accessible as http://jamwiki.org/wiki/en/. The same web application instance could also run other virtual wikis, each with its own stylesheet, recent changes, etc.

The steps for creating a new virtual wiki are:

  1. Access the Special:VirtualWiki page (JAMWiki 0.9.0+) or for earlier JAMWiki releases, access the Special:Maintenance page.
  2. Scroll down to the "add virtual wiki" box, enter a name (one word, no spaces) and click add. A database record for the virtual wiki will be created, but the virtual wiki will not yet be active.
  3. Shut down the web application server.
  4. Edit the web application web.xml file. There will be a mapping of the form:
        <servlet-mapping>
            <servlet-name>jamwiki</servlet-name>
            <url-pattern>/en/*</url-pattern>
        </servlet-mapping>
    
  5. Create a new servlet-mapping, replacing "en" in the above example with the name of the new virtual wiki.
  6. Restart the web application server.
  7. A new virtual wiki will now be available from URLs of the form http://example.com/context/virtual-wiki/

Links can be made between virtual wikis by using the virtual wiki as a prefix in the link, for example [[:en:StartingPoints]].

Handling Spam[edit]

Spam is an unfortunate reality on the internet today, and the sad truth is that while new and more sophisticated methods of dealing with spam will always be created, as long as unscrupulous individuals want to produce spam the problem will never fully go away.

JAMWiki currently (as of JAMWiki 1.2) deals with spam in seven ways:

  1. JAMWiki adds the rel="nofollow" attribute for all external links. Most wiki spam is an attempt to fool search engines into indexing spam sites, and this attribute is a way of indicating to a search engine that a link should not be followed.
  2. JAMWiki implements a regular-expression based spam blacklist. Every edit to the wiki is compared against the blacklist, and if a matching pattern is found then the edit is blocked.
  3. JAMWiki implements a whitelist/blacklist for uploaded files. Spammers and other malicious individuals will often try to attack a site by uploading scripts or spam-filled files, so the whitelist/blacklist allows site administrators to block certain file types from being uploaded.
  4. JAMWiki offers limited capabilities to control user account creation and prevent anonymous users from making edits or uploading files. Since many wikis encourage all users, including anonymous users, to contribute this feature is often of limited use.
  5. JAMWiki 1.1 and later has optional support for reCAPTCHA challenge-response that can be enabled for account creation and for editing to help ensure that the user is a human and not a computer program.
  6. JAMWiki 1.2 and later has optional support for Project Honeypot blacklist integration to block IP addresses that are known to have engaged in recent malicious behavior.
  7. JAMWiki enables spam honeypot input fields within the code to attempt to prevent simple bot attacks.

spam-blacklist.txt[edit]

By default the JAMWiki spam-blacklist.txt file includes many expressions that have been used by spammers, but most sites will need to update this file. To make changes, first add your expression to the file, which can be found in your wiki installation directory at /WEB-INF/classes/spam-blacklist.txt. Entries MUST be valid regular expressions, meaning that periods, dashes, etc. should be escaped with a forward-slash: spam\.somesite\.com. More advanced regular expressions such as buy[ _\-\.](item1|item2) can also be used.

Once the blacklist has been modified the file must be reloaded in JAMWiki by using the "Reload Spam Filter Patterns" button on the Special:Maintenance screen. This option will verify that the file contains valid regular expressions, and if no errors are found will prevent future edits containing blacklisted patterns.

Upload whitelist/blacklist[edit]

Spammers also attack sites by uploading objectionable content. In many cases the content is in the form of a script, an HTML file, or an image. To combat this sort of attack JAMWiki offers the ability to blacklist certain file upload types, or alternatively to create a whitelist of valid upload types.

Upload blacklist/whitelist settings can be modified from the Special:Admin page under the "File Upload Settings" section. First, determine whether a blacklist or whitelist should be used, and then add appropriate patterns. Note that a blacklist will ALLOW uploads of all file types EXCEPT for those found on the blacklist, while a whitelist will BLOCK uploads of all file types EXCEPT for those found on the whitelist.

Other configuration settings[edit]

Logging[edit]

Starting with JAMWiki 1.0.0 logging is handled with the SLF4J logging facade. By default all logging messages will be written to the application server's STDOOUT log, but this can be changed with the /WEB-INF/classes/logback.xml configuration file. To specify which directory log files should be written to, update the LOG_DIR configuration value.

Inter-wiki Links[edit]

JAMWiki 0.3.5 introduced support for inter-wiki links, allowing special syntax to be used for linking to other sites.

The syntax for an inter-wiki link is: [[:wikipedia:Main Page]] which produces the link: wikipedia:Main Page

Interwiki links can be managed from the Special:VirtualWiki page using patterns such as:

wikipedia=http://en.wikipedia.org/wiki/{0}

In this pattern, "wikipedia" is the value to use in the inter-wiki link, and the pattern "http://en.wikipedia.org/wiki/{0}" links to English Wikipedia, with the "{0}" being replaced by the topic included in the inter-wiki link (for example, "Main Page" in the above example).

Alternate parsers[edit]

JAMWiki is built to allow different wiki syntax parsers, configurable using the "Parser" option on the Special:Admin page.

Default JAMWiki Parser[edit]

By default JAMWiki supports the majority of the Mediawiki Syntax and parses text using the JAMWiki default parser. This parser supports the majority of the Mediawiki syntax, including templates, and provides the greatest flexibility for configuring a JAMWiki instance.

An overview of the syntax currently supported by JAMWiki (with examples) is available at Wiki Syntax.

Bliki Parser[edit]

The Wikipedia API from Java Wiki Engine with Wikipedia syntax support, written by Axel Kramer, can be used as an alternative parser for the http://www.jamwiki.org project. You can also test the parser with the Eclipse Wikipedia Editor plugin which uses this parser to render the wiki texts to html. As of JAMWiki 0.5.0 this parser is included in the JAMWiki distribution and can be installed by selecting it in the admin tool.

This parser allows syntax such as the following:

 {{hello world|Hello|World}} 

 [[Template:hello world]]

Now create the Template text by clicking on the Template:hello world link. and write for example:

This is the {{{1}}} {{{2}}} template

Note: Since the Bliki parser is not the official JAMWiki parser it may not fully support all wiki syntax described in the documentation on jamwiki.org, and it does not support custom parser tags. Any specific bugs with the Bliki parser should be reported to the Bliki project since it is maintained separately from the main JAMWiki project.

"Hidden" Properties[edit]

The following properties are not available for editing via the Special:Admin page due to their potential to break wiki functionality, but advanced users may want to modify these values. Patterns must be valid Java regular expressions:

max-recent-changes
[JAMWiki 1.1 or later] This property controls the maximum number of records that will be loaded when using the "Reload Recent Changes" function on the Special:Maintenance page.
pattern-login-valid
This regular expression controls what characters may be used in user logins. By default only letters, numbers and the underscore character can be used.
pattern-role-name-invalid
This regular expression controls what characters may be used when creating new wiki roles.
pattern-topic-name-invalid
This pattern controls what patterns may NOT be used in topic names. Note that changing this value can have unforeseen consequences, so users are advised to test heavily after making any changes to this value.

Alternate Properties File[edit]

It is possible to have JAMWiki initialize using a file other than the normal jamwiki.properties by specifying a system property name jamwiki.property.file that contains the property file name and location. Alternatively, the file can be specified using java -D jamwiki.property.file=location.

Alternate Search Engine[edit]

You can now configure JAMWiki to use an alternative search engine, RankingAlgorithm search engine instead of Lucene. You can configure this using the admin GUI, click on Admin, scroll down to SearchEngine in the Configuration/General settings tab and choose RankingAlgorithm Search Engine from the drop down menu. You can download RankingAlgorithm search engine from here, http://rankingalgorithm.tgels.com. Copy rankingalgorithm.jar file into WEB-INF/lib folder and restart the JAMWiki application. RankingAlgorithm uses the existing Lucene index but ranks and scores documents differently, so no changes are needed other than choosing the RankingAlgorithm Search Engine as the default search engine.

Note: the support for alternate search engine is from JAMWiki ver 1.1

See Also[edit]