---
title: "How to retrieve module information in a JSP?"
url: "https://academy.jahia.com/sites/academy/contents/knowledge-base/2025/how-to-retrieve-module-information-in-a-jsp.html"
last_updated: 2026-10-01
---

# How to retrieve module information in a JSP?

Developer Jahia 8.2

## Question

How to retrieve module information in a JSP? For example, I'd like to display the current version of the module.

## Answer

Here is an example of a JSP to display the module name and version:

```
<%@ page language="java" contentType="text/html;charset=UTF-8" %>
<%@ page import="org.jahia.registries.ServicesRegistry" %>
<%@ page import="org.jahia.services.content.JCRNodeWrapper" %>
<%@ page import="org.jahia.data.templates.JahiaTemplatesPackage" %>
<%@ page import="org.jahia.services.templates.JahiaTemplateManagerService" %>
<%@ taglib prefix="template" uri="http://www.jahia.org/tags/templateLib" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="jcr" uri="http://www.jahia.org/tags/jcr" %>
<%@ taglib prefix="ui" uri="http://www.jahia.org/tags/uiComponentsLib" %>
<%@ taglib prefix="functions" uri="http://www.jahia.org/tags/functions" %>
<%@ taglib prefix="query" uri="http://www.jahia.org/tags/queryLib" %>
<%@ taglib prefix="utility" uri="http://www.jahia.org/tags/utilityLib" %>
<%@ taglib prefix="s" uri="http://www.jahia.org/tags/search" %>
<%--@elvariable id="currentNode" type="org.jahia.services.content.JCRNodeWrapper"--%>
<%--@elvariable id="out" type="java.io.PrintWriter"--%>
<%--@elvariable id="script" type="org.jahia.services.render.scripting.Script"--%>
<%--@elvariable id="scriptInfo" type="java.lang.String"--%>
<%--@elvariable id="workspace" type="java.lang.String"--%>
<%--@elvariable id="renderContext" type="org.jahia.services.render.RenderContext"--%>
<%--@elvariable id="currentResource" type="org.jahia.services.render.Resource"--%>
<%--@elvariable id="url" type="org.jahia.services.render.URLGenerator"--%>

<%
    JahiaTemplateManagerService templateService = ServicesRegistry.getInstance().getJahiaTemplateManagerService();
    JCRNodeWrapper currentNode = (JCRNodeWrapper) pageContext.findAttribute("currentNode");
    JahiaTemplatesPackage pack = ServicesRegistry.getInstance().getJahiaTemplateManagerService().getTemplatePackageById(currentNode.getName());
    out.print(pack.getId());
    out.print("<br>");
    out.print(pack.getVersion());
%>
```

As you can see, we retrieve a [JahiaTemplatesPackage](https://github.com/Jahia/jahia/blob/JAHIA_8_2_2_0/core/src/main/java/org/jahia/data/templates/JahiaTemplatesPackage.java) so, from there, you can retrieve much more information.

Be careful, using a scriptlet is a bad practice, it would be better to define your own custom tag, as [this one](https://github.com/Jahia/jahia/blob/JAHIA_8_2_2_0/taglib/src/main/java/org/jahia/taglibs/template/include/AddResourcesTag.java).
