Sometimes you want to run multiple Wiki instances, for example one for each project you're managing.  The projects have different members and different requirements; perhaps even different access rules.

Here's how you set up multiple wiki-instances:

Way #1 - install another wiki as a web app and give it another name

Way #2 - ...

Let us say that your main wiki instance is called ~GobbleWiki, because your company is called "Gobble Inc", and this is your intranet.  You are using Tomcat, and you have installed it in /opt/tomcat.  You have already set up the ~GobbleWiki directory, and customized your

Now, you have a new project called "Zorp", and you want to establish a "~ZorpWiki" for it.  Do as follows:

Put the following in the /opt/tomcat/conf/server.xml file, within your {{{<Host>}}} -section.

{{{<Context path="/ZorpWiki" docBase="GobbleWiki" debug="0">
  <Parameter name="jspwiki.propertyfile" 

If you are using Tomcat version 5.x.y, then place the above fragment in a file called JSPWiki.xml in the {{/opt/tomcat/conf/Catalina/localhost}} (strictly speaking, in {{/opt/tomcat/conf/[[engine]/[[host]}}) directory, and ''not'' directly in the {{server.xml}} file.  That way, any configuration changes you make to {{JSPWiki.xml}} will be picked-up by Tomcat without needing a server restart.

Or if you are using Jetty, add something like the following to your custom config.xml file:
{{{<Call name="addWebApplication">
    <Call name="setInitParameter">

Take a copy of the {{GobbleWiki/WEB-INF/}} -file, and put it in {{/opt/tomcat/conf/}}.  Then edit it at will.  You definitely want to change the following properties (at least):

* jspwiki.applicationName
* jspwiki.fileSystemProvider.pageDir (or whichever provider you're using)
* jspwiki.basicAttachmentProvider.storageDir (or whichever provider you're using)
* jspwiki.baseURL
* log4j.appender.~FileLog.File (if you're using log4j file logger)
* jspwiki.templateDir (necessary only if you want wiki-specific templates or use custom templates)

Restart Tomcat.


[MultiWiki_Apache2Tomcat55_JSPWiki2_2_28_Discussion] reports on some problems but then ultimately a successfull multi-wiki install on Windows under Apache 2 and Tomcat 5.5 using the multi-context method.


!Upgrading to new version of JSPWiki

Just drop the new "JSPWiki.war" into place as "~GobbleWiki.war".  The ~ZorpWiki should then be automatically able to pick it up.


!One Property File
Okay, so I have 8 wiki's setup, each has it's own property file.  Each property file has the same basic settings (like defining the 8 InterwikiLinks to tie them together).  Is there any way to have __one__ "main" property file that contains all the common settings and specify foreach of the 8 wiki's an "override" property file that contains the settigs that need to be custom to each wiki.

Any ideas? 

Our number of wiki's ia about to explode from 8 to about 15 and I do NOT look forward to having to maintain that many duplicate sets of property files.

--John Volkar

Just a simple idea: Why not have __one__ property file with the basic settings and ''n'' property files with the special settings. It would be quite simple to write kinda script to merge these files... like this (tell it ''''):

cat >
cat >
cat >

# and so on


Tom, this is a good idea (and of course requires no coding).  Like John I'm maintaining several copies of my settings.  The trick will be getting the right split.   However, I just wanted to throw out there that this is a __no brainer__ for the interwiki links.   I want the same links in all my wikis and they have grown to several dozen as I've setup cross referencing links between all the wikis.

So, if I do nothing else, I think I'll write a little script that replaces a tag in my properties file with the interwiki links and start keeping them all in one file.

Thanks for the idea.

-- Scott

Take a look at the [Ant] "replace" -task.  This is what we use to build the file over here when building for different architectures.

-- JanneJalkanen

Finally find ANT at [Ant|] - and yes, I agree to Janne: Don't write a script use Ant! Well writing Ant-XML-Code is like scripting, but in a way we used to understand... -- TomZ

!One file fits 'em all ...
I've solved the same problem in a different application in the following way:
Each key in the properties file has a prefix that corresponds to the name of the instance.


Instead of <Parameter name="jspwiki.propertyfile" .../> you set the prefix that the instance should use for its look-ups, e.g. <Parameter name="jspwiki.instance-name" value="gooble" />
Now the instance always preprends its instance name to the key when it looks up a value.
If the value is not found, <instance-name>.jspwiki.inherits is looked up and the instance name specified there is used instead. This can be done in a loop, so you can have an arbitrary depth of inheritance.

I can provide code snippets if you implement it.

-- BorisFolgmann

Did this ever get implemented? --GM

!Muliple Wikis with extending

I changed the {{loadWebAppProps}}-Methode in the {{WikiEngine}}-Class (just a little bit, see [Attachment|]).
Now I have one Parent-Wiki ("GobbleWiki") with the global default properties and a lot of Child-Wikis ("Zorp1, 2, ...") with child specific properties.\\
The {{{}}} looks like that:\\
{{{jspwiki.applicationName = ZorpWiki
jspwiki.fileSystemProvider.pageDir = C:\\0_Projekte\\0_Workspace\\Zorp\\WikiInstance\\data
jspwiki.basicAttachmentProvider.storageDir = C:\\0_Projekte\\0_Workspace\\Zorp\\WikiInstance\\data
Thats it, changing a global properties in the Gobble {{{}}} takes effect in the Zorp-Wiki.\\

-- OlafKaus

!Muliple Wikis without server.xml

Is there a possibility to set up multiple wikis without making modifications to server.xml?

I don't have my own tomcat-process, my provider only gives me access to the tomcat-manager. So is it somehow possible to set up multiple wikis by using web.xml or other configuration files in the webapp-context?

-- PeterGerstbach

You might have the possibility to place appname.xml files in tomcat's webapps directory. They contain only <Container /> definitions.

-- BorisFolgmann

!Muliple Wikis Using Jetty

Is there a possibility to set up multiple wikis using Jetty rather
than Tomcat? I've been successful in the #1 approach at the top of this page (i.e., making a copy of the wiki under a different name), but I'd prefer to only have one copy of the JSPWiki code if possible. I'd like to use different templates on each.

-- MurrayAltheim

!Multiple Wikis using Tomcat >= 5.5.10

(Currently using JSPWiki 2.2.33) The instructions above using the docBase in the context file works with Tomcat 5.5.9 or less. In 5.5.10, Tomcat started [ignoring the docBase directive if it exists in the default webapp|]. ([Tomcat ChangeLog issue 34840|]) My workaround was to create the directory /usr/local/tomcat/jspwiki-global and drop the JSPWiki.war in that directory and fully qualify the docBase in the context XML file to /usr/local/tomcat/jspwiki-global/JSPWiki.war.

-- DarinPope

!! Question
! Setting and getting same cookies from multiple wikis

Hello, I set up the multiple Wikis and I have one problem.  I am using a user preferences that adds 3 cookies to the client.  My problem is that __Every__ new wiki adds a cookie to the client in his contextPath  e.g. /Wiki1, /Wiki2, or /Wiki3.  I want the set the context Path so all wikis get  and set the same cookies.  I think I can set the path when adding the cookie, but how do I set the context path when getting the cookies, e.g. ~HttpSevletRequest.getCookies() ?

Thanks in advance, if anyone knows the answer please post and email me at

-- Leo Woessner  

! Multiple wikis with the new security mechanism

Will there be a way to specify files like jspwiki.jaas, jspwiki.policy, and userdatabase.xml as context parameters like there is for currently?  Using the multiple-wikis-on-one-war-file method, you'd need this ability in order to support multiple wikis with independent security configurations.  Post or e-mail me: {gmishkin}{at}{bu}{dot}{edu}

''Hi -- I've re-posted your question (and posted an answer) on [Security 2.3 FAQ] -- [Andrew Jaquith]''


Back to [CategoryOfficialDocumentation].


! Changing structure of File system to support Multiple wikis

Hi all

I read the thread. It seems lots of people require this and people have really put efforts for this.
For this purpose i liked the way Twiki does this.

It also stores data in file system. But at the same time It has different directories for different wikis. This is called web in Twiki. I think it can really serve the purpose. Rather than having a new instance of wiki installed on machine.

It just needs one to change how pages are looked for in directory structure. And are saved back.

--Kiran, 20-Feb-2007


How can i setup multiple wikis in jboss linux version?

--[Venkatesh Acharya|], 07-Mar-2007


Is there any simplest approach to achive this target.
If someone wants to use jboss as server what should be the files(to modify).

If we are talking about i am keeping all file structure based on every wiki at particaular location say c://wiki/name of wiki etc.
as wiki changes this name will also change in all wikis.

If any other apporach can be followed: - Like
all wikis are going to use same source. but by making modification to the properties file we can just store all data respective to different wikis.
Now if even this works how a user will access different wikis.
Are we creating a single site with first page displaying names of all wikis in first page itself.and then you click on any wiki name the data will reflect based on that only. 
I might have misunderstood something.
Please correct me and guide me which way to follow.
-- vijendra , 07-March-2007   
Have anyone made multiple wikis in websphere?
--manie, june - 07


In jboss, you can setup the param name for your app context by doing the following:

a) Create a new file called context.xml and place it inside the jspwiki /WEB-INF folder. For this to work, you need to explode the war file. 
b) Add the following lines in the context.xml file:

<Context cookies="true" crossContext="true">\\
  <Parameter name="jspwiki.propertyfile" \\
    value="<path to your property file>"\\
    override="false"/>   \\

--[Azlin|], 08-Jun-2007
!!Multiple Wikis in JBoss

Hi, I have a problem. I want instance multiple wikis using a single jspwiki.propieties.\\
I want  that when i put in the URL http:\localhost:8080\Jspwiki\wiki1 the jspwiki.propeties make one thing and if I put http:\localhost:8080\Jspwiki\wiki2 makes other thing.

How i can resolve this problem?