Hi Janne,

this helps for streamlining my configuration but does not solve the problem - ${localhost.hostName} whould be completely dynamic (InetAddress.getHostName()), i.e. no manual configuration involved.

Cheers,

Siegfried Goeschl

On 25.02.10 20:27, Janne Jalkanen wrote:

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" identifier
* to use this variable.
*
* For example you could declare a base directory for all your files
* like this and use it in all your other property definitions with
* 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 container.
* <pre>
* jspwiki.properties.cascade.1
* jspwiki.properties.cascade.2
* jspwiki.properties.cascade.3
* </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 [JSPWiki:MultipleWikis].

/Janne

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.properties

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


Reply via email to