Include Servlet Macro
Last modified by Thomas Mortagne on 2026/02/26 15:38
| Includes dynamic content inside an XWiki page. |
| Type | Doc (Velocity Macro) |
| Category | |
| Developed by | |
| Rating | |
| License | GNU Lesser General Public License 2.1 |
Table of contents
Description
Includes dynamic content such as Servlets or JSPs inside an XWiki page.
Usage
#includeServlet($url)Parameters definition
| Name | Optional | Allowed values | Default value | Description |
|---|---|---|---|---|
| url | no | a string | none | URL of the servlet or JSP page |
Example
Let's say you have a legacy pagefooter that needs to be included in an XWiki page:
#includeServlet("/jsp/pagefooter.jsp")For this to work a jsp servlet must be correctly declared and configured in XWiki's web.xml file.