Scripts in XWiki

Last modified by superadmin on 2026/11/25 21:39

Web applications built inside wiki pages, without compiling or deploying anything, through one macro per scripting language.

Explanation

Warning

WIP

You write scripting syntax alongside wiki markup inside the content of a page (see the script syntax for the XWiki 2.1 syntax).

XWiki integrates JSR-223 scripting, giving pages access to XWiki's programming API. This means a page can query, read, and manipulate the wiki and its documents directly, rather than relying on a separately deployed component.

Scripts run through dedicated macros, one per supported language. XWiki provides a generic Script Macro plus one dedicated macro per scripting language.

Macros not installed by default require installing the corresponding extension before use.

FAQ

Can anyone insert and run scripts?

No. Only users with Programming or Script permissions can run the scripts. If you don't have the required permissions, you'll see an error similar to:

Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [xwiki:a.WebHome]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.

This error means your administrator needs to grant you Script/Programming permissions before you can insert or edit scripts.

More

To find more about the current topic, you can search or use the table below and filter the columns to narrow your choices.

Related

Get Connected