Include Servlet Macro

Last modified by Vincent Massol on 2024/07/05 17:55

cogIncludes dynamic content inside an XWiki page.
TypeDoc (Velocity Macro)
Category
Developed by

XWiki Development Team

Rating
0 Votes
LicenseGNU Lesser General Public License 2.1

Description

Includes dynamic content such as Servlets or JSPs inside an XWiki page.

Usage

#includeServlet($url)

Parameters definition

NameOptionalAllowed valuesDefault valueDescription
urlnoa stringnoneURL 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.

Get Connected