The jspwiki.properties file is the main configuration file, which normally resides under your WEB-INF -directory. However, you can put it in some other directory by using the servlet parameter "jspwiki.propertyfile", as explained under Wiki.Admin.Multiple Wikis.

Wherever it is said that an option can be "true" or "false", you can also use "yes"/"no", or "on/off". Just for some convenience.


Core properties#

The core properties are properties which are mandatory to set for each JSPWiki instance.

jspwiki.applicationName#

You can use this to override the default application name. It affects the HTML titles and logging, for example. It can be different from the actual web name (http://my.com/mywiki) of the application, but usually it is the same.

Note that it must be different for each wiki within the same servlet container instance!

jspwiki.applicationName = MyWiki

jspwiki.pageProvider#

This property determines how JSPWiki should store the pages. The different possibilities are:

  • RCSFileProvider, if you want to store your pages in the RCS revisioning system. Note that this needs the RCS executables in your path and accessible to JSPWiki. The advantage is that the resulting storage is relatively compact, since it only stores page differences.
  • FileSystemProvider, if you want to store the pages without versioning, just in a flat directory.
  • VersioningFileProvider, if you want to have versioning, but don't want to deal with the problems that RCS might bring in.

Example:

jspwiki.pageProvider = FileSystemProvider

If you're using a third-party provider, then you need to type in the full class name here. E.g.

jspwiki.pageProvider = com.mycompany.jspwiki.customproviders.MyCustomProvider

jspwiki.fileSystemProvider.pageDir#

The file-based providers need to be told where to keep the files. So if you're using FileSystemProvider, RCSFileProvider, or VersioningFileProvider, you must set the following property.

Example:

jspwiki.fileSystemProvider.pageDir = /p/web/www-data/jspwiki/
If you're using Windows, then you must duplicate the backslashes. For example, use:
jspwiki.fileSystemProvider.pageDir = C:\\Data\\jspwiki

jspwiki.attachmentProvider#

JSPWiki can store attachments in a separate system to pages (this allows you to store pages e.g. in a JDBC database, but keep the possibly large files in some directory). Use this property to determine which attachment provider you would like to use.

Your possibilities are:

Leave the property empty to disable attachments (if you have a good reason).

jspwiki.attachmentProvider = BasicAttachmentProvider

jspwiki.basicAttachmentProvider.storageDir#

The BasicAttachmentProvider needs to know where to store the files the user has uploaded. It's okay to put these in the same directory as you put your text files (i.e. the pageDir setting above).

Example:

jspwiki.basicAttachmentProvider.storageDir = /p/web/www-data/jspwiki/
If you're using Windows, then you must duplicate the backslashes. For example, use:
jspwiki.basicAttachmentProvider.storageDir = C:\\Data\\jspwiki

jspwiki.workDir#

JSPWiki will create a bunch of temporary files while it is running. For example, files are uploaded there before being transferred to the wiki repository. Also, the LuceneSearchProvider will store it's index there, and also certain cache files are stored there (so that the next time JSPWiki starts, it's faster).

It is HIGHLY recommended that you set this property, even though strictly speaking it is not necessary. The work directory must be separate for each wiki.

Example:

jspwiki.workDir = /var/cache/jspwiki/MyWiki

jspwiki.baseURL#

This is the URL at which your wiki lives. It is a very good idea to set it, because things such as RSS generation depend on absolute URLs. The property jspwiki.referenceStyle controls whether the generated URLs inside the wiki are relative or absolute.

Example:

jspwiki.baseURL = http://www.jspwiki.org/

Another Example for a Wiki Residing at a Deeper Context Path ("/wiki/stud") on a host named "fb6.tfh-berlin.de":

jspwiki.baseURL = http://fb6.tfh-berlin.de/wiki/stud/

jspwiki.encoding#

Determines which character encoding JSPWiki should use. If you want to support all languages in your Wiki, you probably want to enable this. It is strongly suggested that you use UTF-8. In the future, UTF-8 will be the default on all new wiki instances, so you might have as well get used to it right away. Possible values are 'ISO-8859-1' (default, if none has been specified) and 'UTF-8'.

Example:

jspwiki.encoding = UTF-8

RefactorMe everything below. Maybe they should go on their separate pages?
#
#  Set to true, if you want to cache page data into memory.  This is
#  in general a good idea.
#
#  Default is false (no cache).
#
#  NB: This replaces the JSPWiki 1.x "CachingProvider" setting, since it
#      probably was too confusing.
#
jspwiki.usePageCache = true


#
#  You can limit the maximum size of an attachment by setting this
#  value.  The value is in bytes, and by default all attachments
#  are accepted.
#
#  The following line would limit the attachment size to 100,000 bytes
#jspwiki.attachment.maxsize=100000

#  Determines if you need to have relative urls or not.  If the baseURL
#  is not set, then this has no effect, but if you set the baseURL (which
#  is highly recommended), you can use this to set relative urls.
#
#  Possible values are "absolute" and "relative".
#
#jspwiki.referenceStyle=relative



Page history and diffs#

#
#  page Diff Representation
#
#  To show differences between page versions, you can define a 
# difference provider. 
#  The following choices are available:
#    * TraditionalDiffProvider - Uses internal (java) diff
#        to create a list of changes and shows it line by
#        line colored. This is the default
#    * ContextualDiffProvider - Uses internal (java) diff
#        to create changes inline and shows it on a word by
#        word basis using CSS. This is much superior to the
#        traditional diff provider, however, it is still quite
#        new and not much tested. YMMV.
#    * ExternalDiffProvider - uses a system diff program (which
#        can be configured using "jspwiki.diffCommand") to 
#        create an unified (!) diff.
#
#        Example for a diff command:
#        jspwiki.diffCommand = /usr/bin/diff -u %s1 %s2
#
jspwiki.diffProvider = TraditionalDiffProvider


#
#  Determines whether raw HTML is allowed as Wiki input.
#
#  THIS IS A DANGEROUS OPTION!
#
#  If you decide to allow raw HTML, understand that ANY person who has
#  access to your Wiki site can embed ANY sort of malicious JavaScript,
#  or plugin, or ActiveX, or whatever on your site.  They can even mess it
#  up so royally it is impossible for you to replace the situation without
#  the need of direct access to the repository.  So think twice before
#  allowing raw HTML on your own site.
#
#  Most probably you want to use this on Intranets, or personal servers,
#  where only a handful of people can access the wiki.
#
#  Text between {{{ and } } } -options is not affected by this setting, so
#  it's always safe to quote HTML code with those.
#
#  The default for this option is "false".
#
jspwiki.translatorReader.allowHTML = false

Usability niceties.#

#
#
#  If this property is set to "true", then page titles are rendered
#  using an extra space between every capital letter.  It may make
#  page titles readable on some occasions, but it does have the
#  drawback of making the titles look a bit funny at times.
#
jspwiki.breakTitleWithSpaces = false

#
#  If set to true, this property means that "WikiName" and "WikiNames"
#  are considered equal when linking between them.  Setting this to
#  true does not prevent you from having both kinds of pages - we just
#  fall back to the other one if the primary name does not exist.
#
#  For any other language, you'll probably want to turn this off.
#
jspwiki.translatorReader.matchEnglishPlurals = true

#
#  If you set this to true, the Wiki translator will then also consider
#  "traditional" WikiNames (that is, names of pages JustSmashedTogether
#  without square brackets) as hyperlinks.  This technique is also
#  known as "CamelCase", or "BumpyCase", or "InterCapping".  I personally
#  like CamelCase as a word, which is why this property is named as it is :-).
#
#  By default this is false, since traditional WikiLinks may confuse newbies.
#
#  This option can be overridden on a per-page basis using the SET directive.
#
jspwiki.translatorReader.camelCaseLinks = false

#
#  This sets the default template used by the Wiki engine.  The templates
#  live in templates/<template name>.  JSPWiki will attempt to find three
#  basic templates from that directory: "ViewTemplate," "EditTemplate"
#  and "AdminTemplate"
#
#  By default this is called "default".
#
#  This option can be overridden on a per-page basis using the SET directive.
#
jspwiki.templateDir = default

#
#  The name of the front page.  This is the page that gets loaded if no
#  other page is loaded.  Up until JSPWiki 1.9.28, it was always called
#  "Main", but now you can easily change the default front page here.  If not
#  defined, uses "Main".
#
#jspwiki.frontPage = Main

#
#  If set to true, all outward links have a small icon attached.  The icon
#  can be found from images/out.png.  Default is true.
#
jspwiki.translatorReader.useOutlinkImage = true

#
#  Set this to the number of minutes a person can "lock" a page
#  for while he is editing it.
#
jspwiki.lockExpiryTime = 60

#
#  Search provider used for searching pages and attachments.
#  Default is LuceneSearchProvider, but you can fall back to BasicSearchProvider
#
jspwiki.searchProvider = LuceneSearchProvider

#
#  If your wiki's language is something else than English, you might
#  want to visit jakarta.apache.org/lucene and download a proper Analyzer
#  for your language.  Default is to use StandardAnalyzer.
#
#jspwiki.lucene.analyzer = org.apache.lucene.analysis.standard.StandardAnalyzer

############################################################################
#
#  Special page references.
#
#  The URL is relative to Wiki.jsp.  However, if you use
#  a full, absolute URL, you can also do that.
#
# Example to redirect all requests to a page called 'OriginalWiki'
# to the original wikiwiki at http://c2.com/cgi/wiki
#
# jspwiki.specialPage.OriginalWiki = http://c2.com/cgi/wiki
#
#  Note that it is entirely possible to override any Wiki page, even
#  an existing one by redefining it here.
#
jspwiki.specialPage.CreateGroup = NewGroup.jsp
jspwiki.specialPage.FindPage = Search.jsp
jspwiki.specialPage.Login = Login.jsp
jspwiki.specialPage.NewGroup = NewGroup.jsp
jspwiki.specialPage.UserPreferences = UserPreferences.jsp

#############################################################################
#
#  Plugin search paths.
#
#  Define here the packages you want to use for searching plugins, 
#  separated with commas.
#  For example, use the following command to add "org.myorganisation.jspwiki.myplugins"
#  and "com.foobar.myplugins" to the search path.
#
#  The default path is "com.ecyrd.jspwiki.plugins", and it will be always
#  the last item on the path.  This allows you to override JSPWiki default
#  plugins.  Note that you are only adding to the path, not replacing it (ie.
#  the default path is never removed.)
#
#  jspwiki.plugin.searchPath = org.myorganisation.jspwiki.myplugins,com.foobar.myplugins
#
jspwiki.plugin.searchPath = 

#############################################################################
#
#  Page filters
#
#  Normally, the filter configuration is in your WEB-INF/ directory, so you
#  do not need to go and specify this.  However, if your filters.xml live somewhere
#  else, you'll have to specify it here.
#
#jspwiki.filterConfig = /some/path/to/your/filters.xml

#############################################################################
#
#  URL Constructor
#
#  JSPWiki by default generates page and attachment links that use JSP
#  pages and request parameters. It can also use alternative URL 
#  constructors so that URL pages resemble traditional website paths, too.
#  You have three choices for generating URLs:
#
#     DefaultURLConstructor - uses JSPs for all references:
#         http://mywiki.com/jspwiki/Wiki.jsp?page=Main
#         http://mywiki.com/jspwiki/Edit.jsp?page=Main
#
#     ShortURLConstructor - uses path-like reference style:
#         http://mywiki.com/jspwiki/wiki/Main
#         http://mywiki.com/jspwiki/wiki/Main?do=Edit
#
#     ShortViewURLConstructor - uses path-like references for views; JSPs for everything else:
#         http://mywiki.com/jspwiki/wiki/Main
#         http://mywiki.com/jspwiki/Edit.jsp?page=Main
#
#  Of course, you can also write your own implementation if you wish.
#  
#  For either of the ShortURL constructors, you can also specify a 
#  prefix path to go in front of page names. By default, the
#  prefix is '/wiki'.
#
#jspwiki.urlConstructor = DefaultURLConstructor
#jspwiki.urlConstructor = ShortViewURLConstructor
#jspwiki.shortURLConstructor.prefix = /wiki

#############################################################################
#
# Rendering
#
# At this time, entries here are strictly for development and testing.
#

# Disable internal caching of pre-constructed document DOMs.
# This may be necessary if you require custom rendering that must not be cached.
#jspwiki.renderingManager.useCache = false

#############################################################################
#
# InterWiki links 
#
# The %s is replaced with the page reference (specify
# multiple times to get multiple references).  Page references should
# appear in format : [wiki:wikipage].  
#
# This is the JSPWiki home.  In future, JSPWiki will probably rely on this
# for error messages, so I don't recommend that you change it.
jspwiki.interWikiRef.JSPWiki = http://www.jspwiki.org/Wiki.jsp?page=%s

# Here's how you can have directly links to the JSPWiki editor.
# Now you can put a hyperlink for editing "MainPage" by making 
# a link [Edit:MainPage].
jspwiki.interWikiRef.Edit = Edit.jsp?page=%s

#  This is the original WikiWikiWeb
jspwiki.interWikiRef.WikiWikiWeb = http://c2.com/cgi/wiki?%s

#  TWiki, a very nice WikiClone.
jspwiki.interWikiRef.TWiki = http://twiki.org/cgi-bin/view/TWiki/%s

#  MeatballWiki, which seems to be quite popular.
jspwiki.interWikiRef.MeatballWiki = http://usemod.com/cgi-bin/mb.pl?%s

#  Wikipedia, a Wiki encyclopedia!
jspwiki.interWikiRef.Wikipedia = http://www.wikipedia.com/wiki/%s

#  Google, the ubiquitous search engine.
jspwiki.interWikiRef.Google = http://www.google.com/search?q=%s

#  JSPWiki documentation (for this release)
jspwiki.interWikiRef.Doc = http://doc.jspwiki.org/2.2/Wiki.jsp?page=%s

############################################################################
#
# Define which image types are inlined.
# These are your standard glob expressions (just like in your
# Windows or UNIX shells).  Default pattern is to include all PNG
# images.  If you specify something here, you will override the default.
#
# Don't forget to increase the number after the dot - duplicate entries 
# cause problems!
#
# For example:
#   Inline all JPG files, PNG files and all files from images.com:
#
#      jspwiki.translatorReader.inlinePattern.1 = *.jpg
#      jspwiki.translatorReader.inlinePattern.2 = *.png
#      jspwiki.translatorReader.inlinePattern.3 = http://images.com/*


###########################################################################
#
#  Determine how the RSS (Rich Site Summary) file generation should work.
#  RSS is a standard pioneered by Netscape, which allows you to join your
#  Wiki with a huge number of different news services around the world.
#  Try a Google search on RSS and see what you can do with it.
#
#  All of these settings were added in JSPWiki 1.7.6.
#
#  Note that jspwiki.baseURL MUST BE DEFINED if you want to enable RSS!
#
#  Determine if the RSS file should be generated at all.  Allowed values
#  are "true" and "false".  Default is "false".

#
jspwiki.rss.generate = false

#
#  Determine the name of the RSS file. This path is relative to your
#  Wiki root.  Default is "rss.rdf"
#
jspwiki.rss.fileName = rss.rdf

#
#  Determine the refresh interval (ie. how often the RSS file is regenerated.
#  It is not recommended to make this too often, or you'll choke your server.
#  Anything above five minutes is probably okay.  The default value is one hour.
#  The value should be in seconds.
#
jspwiki.rss.interval = 3600

#
#  The text you want to be shown as your "channel description" when someone
#  subscribes to it.  You can be quite verbose here, up to 500 characters or
#  so.  You can continue to a new line by adding a backslash to the end of the
#  line.  Default is to have no description.
#
jspwiki.rss.channelDescription = Oh poor me, my owner has not set \
                                 a channel description at all. \
                                 Pity me.

#
#  The language of your Wiki.  This is a standard, two-letter language
#  code, or in case of some languages, two letters for the country,
#  a dash, and two letters for the dialect.
#
jspwiki.rss.channelLanguage = en-us

###########################################################################
#
#  Determine how certain file commands are run.  They have been
#  commented out, since most likely you want to use the defaults.
#  Be warned, making mistakes with these may well ruin your entire
#  Wiki collection!
#
#  The command to run diff:
#     NOTE! If you do not specify this, an internal "diff" routine is used.
#           In most cases, you really should not touch this.
#
#jspwiki.diffCommand = diff -u %s1 %s2

#  The command for RCS checkin
#jspwiki.rcsFileProvider.checkinCommand = ci -q -mx -l -t-none %s

#  The command for RCS checkout of the newest version
#jspwiki.rcsFileProvider.checkoutCommand = co -l %s

#  The command for checking out a specific version (%v = version number)
#jspwiki.rcsFileProvider.checkoutVersionCommand = co -p -r1.%v %s

#  The command for RCS log headers
#  If you have a version of RCS that does not support the "-z" flag, then
#  you can try this one out without it.  It should work.
#jspwiki.rcsFileProvider.logCommand = rlog -zLT -h %s

#  The command for getting the entire modification history
#jspwiki.rcsFileProvider.fullLogCommand = rlog -zLT %s

###########################################################################
#
#  JavaMail configuration.  If you wish to allow your users to recover
#  their passwords via email, then you probably wish to set these
#  variables as well.
#
#  Your SMTP host (i.e. the one which sends email)
mail.smtp.host=localhost

#  The address from which the email appears to come
mail.from=JSPWiki@localhost

#  Since 2.8 you can use sectional editing.
#  You can turn it on in your prefs, the default however 
#  (if you haven't set this prefs yet) can be configured 
#  with this property

#jspwiki.defaultprefs.template.sectionediting=on

Security, authentication and authorization#

#############################################################################
#
#  Security, authentication and authorization
#

#  JSPWiki supports a plugin-based interface for talking to different
#  kinds of authentication and authorization systems. By "authentication," 
#  we mean a system for logging in a user to establish their identity.
#  By "authorization," we mean a system for figuring out what actions
#  users can perform based on their authenticated identities.
#
#  For users looking to get started quickly, the default settings below
#  should work fine. In addition to the properties below, you may also
#  want to set the following JRE runtime properties when running JSPWiki
#  or the servlet container it runs in:
#
#     java.security.auth.login.config==/path-to/jspwiki.jass
#     java.security.policy=/path-to/jspwiki.policy
#
#  See the jspwiki.properties and jspwiki.jaas files for more details on
#  how to do this. These files contain addition configuration options
#  for the JSPWiki security policy and authentication, respectively, although
#  the defaults should work fine. If you don't set the JRE properties,
#  JSPWiki will use default versions from the WEB-INF directory.

#  AUTHENTICATION
#  For authentication, JSPWiki uses JAAS (Java Authentication and Authorization
#  Service). The Authentication system is configured in the jspwiki.jaas 
#  file; by default it will attempt to leverage your servlet container's
#  authentication services, if present. JSPWiki also can use its own
#  authentication system, which is separate from the container.
#  
#  JSPWiki will try to detect whether you are using container authentication
#  To use container authentication, you must uncomment
#  the <security-constraint> elements in WEB-INF/web.xml.
#
#  AUTHORIZATION (EXTERNAL)
#  For authorization, JSPWiki has a two-tier system. When we want to 
#  determine whether a user has permission to perform a certain action,
#  we first consult an external "authorizer" to determine if the user
#  is a member of the required role. By default, JSPWiki uses the 
#  servlet container's authorization service for this (that is, it
#  calls HttpServletRequest.isUserInRole(String) ).
#  However, you can use another Authorizer if you wish; specify that
#  class here.

jspwiki.authorizer          = com.ecyrd.jspwiki.auth.authorize.WebContainerAuthorizer

#  AUTHORIZATION (GROUPS)
#  If the external authorizer fails, we also consult JSPWiki's GroupManager.
#  Groups are "ad hoc" roles defined by wiki users. By default, JSPWiki
#  scans existing pages with the prefix "Group" to define groups.
#  For example, the wiki page "GroupTest" with this markup:
#
#      [{SET members=Alice, Bob, Charlie}]
#
#  ...causes JSPWiki to create a group called "Test" with three members.
#  If groups are defined elsewhere on your system, specify the GroupManager
#  implementation class here:

#  B) GROUPS
#  As an additional source of authorization, users can belong to discretionary
#  "wiki groups" that the users manage themselves. Wiki groups are stored in a
#  GroupDatabase. The default group database uses an XML file for persistent
#  storage. Override with your own GroupDatabase implementation with this property:

jspwiki.groupdatabase = com.ecyrd.jspwiki.auth.authorize.XMLGroupDatabase

#  The default group database implementation stores member lists
#  in an XML file. The location of this file should be in a secure directory
#  in the filesystem; for example, in /etc or your servlet container's
#  configuration directory If you do not supply a value for this property,
#  a blank group database will be initialized in the WEB-INF/ directory of the
#  deployed webapp. Since these directories are often overwritten when webapps
#  are undeployed or redeployed, you should probably set this property to
#  something useful as soon as you can. But for test wikis, it's probably
#  ok to leave this un-set, as long as users know that their groups could
#  "disappear" if the wiki app is ever redeployed.

#jspwiki.xmlGroupDatabaseFile = /etc/tomcat/groupdatabase.xml

#  USER DATABASE
#  User's wiki profiles are stored in a UserDatabase. The default user database
#  uses an XML file for persistent storage.
#  Override with your own UserDatabase implementation with this property:

jspwiki.userdatabase = com.ecyrd.jspwiki.auth.user.XMLUserDatabase

#  The default user database implementation stores usernames and passwords
#  in an XML file. Passwords are SHA-1 hashed. The location of this file
#  should be in a secure directory in the filesystem; for example, in
#  /etc or your servlet container's configuration directory.
#  If you do not supply a value for this property, a blank user database
#  will be initialized in the WEB-INF/ directory of the deployed webapp.
#  Since these directories are often overwritten when webapps are
#  undeployed or redeployed, you should probably set this property to
#  something useful as soon as you can. But for test wikis, it's probably
#  ok to leave this un-set, as long as users know that their profiles could
#  "disappear" if the wiki app is ever redeployed.

#jspwiki.xmlUserDatabaseFile = /etc/tomcat/userdatabase.xml

# You can also use a JDBC database for storing user profiles. 
# See the online AuthenticationAndAuthorization2.3 docs for details on 
# how to configure it.

#jspwiki.userdatabase = com.ecyrd.jspwiki.auth.user.JDBCUserDatabase

#  If your JSPWiki user database shares login information with your
#  web container's authentication realm, you can configure JSPWiki to
#  add container users. At present, this only works with JDBCUserDatabase,
#  and only if you've configured your web container to use a database
#  with compatible columns and tables. If you don't know what this means,
#  then leave this property set to FALSE (the default).

#jspwiki.userdatabase.isSharedWithContainer = false

#  ACCESS CONTROL LISTS
#  Last but not least, JSPWiki needs a way of reading and persisting page
#  access control lists. The default implementation reads these from the page
#  markup. For example: "[{ALLOW edit Charlie}]". If using a custom
#  ACL manager, specify the AclManager implementation class here:

jspwiki.aclManager          = com.ecyrd.jspwiki.auth.acl.DefaultAclManager

#  JSPWiki admin UI (Admin.jsp) is an experimental feature, and is not guaranteed to work.
#  It is useful during initial installation of JSPWiki, for security reasons
#  you should turn it off after your installation is complete.
#  You may turn it on by specifying this property on.

#jspwiki-x.adminui.enable=true

JDBC User Database#

###########################################################################
#
#  JDBC Configuration. Tells JSPWiki which tables and columns to map
#  to for the JDBCUserDatabase. For more info, see the JavaDoc
#  for class com.ecyrd.jspwiki.auth.user.JDBCUserDatabase.
#
jspwiki.userdatabase.datasource=jdbc/UserDatabase
jspwiki.userdatabase.table=users
jspwiki.userdatabase.uid=uid
jspwiki.userdatabase.email=email
jspwiki.userdatabase.fullName=full_name
jspwiki.userdatabase.loginName=login_name
jspwiki.userdatabase.password=password
jspwiki.userdatabase.wikiName=wiki_name
jspwiki.userdatabase.created=created
jspwiki.userdatabase.modified=modified
jspwiki.userdatabase.lockExpiry=lock_expiry
jspwiki.userdatabase.attributes=attributes
jspwiki.userdatabase.roleTable=roles
jspwiki.userdatabase.role=role
jspwiki.groupdatabase.datasource=jdbc/GroupDatabase
jspwiki.groupdatabase.table=groups
jspwiki.groupdatabase.membertable=group_members
jspwiki.groupdatabase.created=created
jspwiki.groupdatabase.creator=creator
jspwiki.groupdatabase.name=name
jspwiki.groupdatabase.member=member
jspwiki.groupdatabase.modified=modified
jspwiki.groupdatabase.modifier=modifier

Logging#

JSPWiki uses the highly configurable log4j logging framework. The full extent on how to configure logging is out of the scope of this document, but we explain here some of the basic configuration tricks:

How to send mail upon serious errors#

Put the following in your jspwiki.properties. Change the To and From and Subject fields to whatever you please, and don't forget to set the SMTPHost to your mail server.

log4j.appender.mail = org.apache.log4j.net.SMTPAppender
log4j.appender.mail.Threshold = WARN
log4j.appender.mail.To = root@localhost
log4j.appender.mail.From = JSPWiki@localhost
log4j.appender.mail.Subject = Problem with JSPWiki!
log4j.appender.mail.SMTPHost = mail

log4j.appender.mail.layout = org.apache.log4j.PatternLayout
log4j.appender.mail.layout.ConversionPattern =%d [%t] %p %c %x - %m%n

Configuring a file log#

Log everything into a file, roll it over every 10 MB, keep only 14 latest ones. Don't forget to updated the File parameter to your own log file position!

log4j.appender.FileLog = org.apache.log4j.RollingFileAppender
log4j.appender.FileLog.MaxFileSize    = 10MB
log4j.appender.FileLog.MaxBackupIndex = 14
log4j.appender.FileLog.File = /tmp/jspwiki.log
log4j.appender.FileLog.layout = org.apache.log4j.PatternLayout
log4j.appender.FileLog.layout.ConversionPattern=%d [%t] %p %c %x - %m%n

Enabling logs#

If you want to use some other logging system (such as JBoss, which uses log4j already, comment this line out. If you just don't want any logs at all, you can set it to be empty. However, I suggest that you do at least to a level of WARN.

The following line says "send all events of at least INFO severity to the FileLog".

log4j.rootCategory=INFO,FileLog

Or, if you have configured mailing, above, don't forget to enable it, too!

log4j.rootCategory=INFO,FileLog,mail

Turning on full DEBUG mode#

Put the following lines in your jspwiki.properties to turn on full debug mode. Be aware that full DEBUG is very verbose, and you will see lots and lots of uninteresting data. However, if there is a serious problem and you want to report it, it's a good idea to turn on the DEBUG logging.

log4j.rootCategory=DEBUG,FileLog
log4j.logger.SecurityLog=DEBUG,SecurityAppender

Detailed security logging#

Add these lines if you want to see detailed security event logging. The logging levels are as follows:

  • ERROR: login errors (other than failed/expired logins)
  • WARN: access denied, failed login (account expired, password/credential expired)
  • INFO: login, logout
  • DEBUG: add/remove group, add/remove group member, clear groups/group members, access allowed
log4j.logger.SecurityLog=INFO, SecurityAppender
log4j.appender.SecurityAppender = org.apache.log4j.RollingFileAppender
log4j.appender.SecurityAppender.MaxFileSize    = 10MB
log4j.appender.SecurityAppender.MaxBackupIndex = 14
log4j.appender.SecurityAppender.File = /tmp/security.log
log4j.appender.SecurityAppender.layout = org.apache.log4j.PatternLayout
log4j.appender.SecurityAppender.layout.ConversionPattern=%d %p - %m%n

Workflow#

###########################################################################
#
# Workflow configuration
#
# The following properties map specific workflow steps to their associated approvers
# The name of the workflow or decision is the part of the key after "jspwiki.approver.".
# This is a logical name JSPWiki uses to determine which Principal to consult for approval.
# The Principal is identified up by AuthorizationManager at runtime; it looks for a Principal
# match as follows: GroupPrincipals; Roles; WikiPrincipals/other principals. Thus, if a value
# of "Admin" is supplied JSPWiki will first check the GroupManager to see if group Admin exits;
# then the container roles, if any; then, user Principals. If the value is blank or the
# property is commented out, it means that the workflow does not require approval.
#
# EXAMPLE:
# Uncomment the next line to require the Admin group (or Admin user, if a group is not found)
# to approve wiki pages after saving.
#jspwiki.approver.workflow.saveWikiPage=Admin

# Uncomment the next line to require the Admin group to approve new user profiles
#jspwiki.approver.workflow.createUserProfile=Admin

### End of configuration file.

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
png
xmlCoffeeCup.png 1.2 kB 1 22-Jun-2012 21:16 63.172.244.130
« This page (revision-16) was last changed on 28-May-2009 23:02 by Stone Brooks  
G’day (anonymous guest) My Prefs
This is the left menu footer
JSPWiki v2.8.3-svn-4