incubator-jspwiki-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janne Jalkanen <>
Subject Re: Can the "jspwiki.baseURL" expanded dynamically?
Date Thu, 25 Feb 2010 19:27:55 GMT

Ugh... Yeah, you might be able to do that using cascading properties  
and variable expansion, and storing one of the cascading propfiles  
somewhere where it's easily editable.  This isn't documented very well  
anywhere, but here are the relevant snippets:

      *  You define a property variable by using the prefix "var.x" as a
      *  property. In property values you can then use the "$x"  
      *  to use this variable.
      *  For example you could declare a base directory for all your  
      *  like this and use it in all your other property definitions  
      *  a "$basedir". Note that it does not matter if you define the
      *  variable before its usage.
      *  <pre>
      *  var.basedir = /p/mywiki;
      *  jspwiki.fileSystemProvider.pageDir =         $basedir/www/
      *  jspwiki.basicAttachmentProvider.storageDir = $basedir/www/
      *  jspwiki.workDir =                            $basedir/wrk/
      *  </pre>

      *  <h3>Cascading Properties</h3>
      *  <p>
      *  You can define additional property files and merge them into  
the default
      *  properties file in a similar process to how you define  
cascading style
      *  sheets; hence we call this <i>cascading property files</i>.  
This way you
      *  can overwrite the default values and only specify the  
properties you
      *  need to change in a multiple wiki environment.
      *  <p>
      *  You define a cascade in the context mapping of your servlet  
      *  <pre>
      *  </pre>
      *  and so on. You have to number your cascade in a descending  
way starting
      *  with "1". This means you cannot leave out numbers in your  
cascade. This
      *  method is based on an idea by Olaf Kaus, see  


On Feb 25, 2010, at 17:23 , Siegfried Goeschl wrote:

> Hi folks,
> for my "Wiki On A Stick" I'm currently using the following entry in  
> jspwiki.baseURL=http://localhost:9627/wiki/
> That works fine if your server is running on your local machine but  
> not on a copy of local wiki on a different box. Is there something  
> to expand the host name and/or address automatically
> jspwiki.baseURL=http://${localhost.hostName}:9627/wiki/
> or
> jspwiki.baseURL=http://${localhost.address}:9627/wiki/
> assuming that this will break on a multi-homed host
> Thanks in advance
> Siegfried Goeschl

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message