Customizing DSpace 6.3 JSPUI: Display Canonical Handle with Configurable Domain This guide explains how to change the citation handle URL in display-item.jsp so that it uses a fixed base URL (like https://dspace.iiti.ac.in/handle/) and makes that domain configurable via dspace.cfg.
dspace.cfg Open the DSpace configuration file located at:``[dspace]/config/dspace.cfg
Add this new property at the end of the file:
jspui.citation.baseurl = https://dspace.iiti.ac.in`
display-item.jspOpen:
[dspace-src]/dspace-jspui/src/main/webapp/item/display-item.jsp
Find and replace the existing citation display block with the following code:
<% String baseUrl = org.dspace.core.ConfigurationManager.getProperty("jspui.citation.baseurl");
%>
<div class="well">
<fmt:message key="jsp.display-item.identifier"/>
<code><%= baseUrl + "/handle/" + item.getHandle() %></code>
</div>
Note:
ConfigurationManageris part of the DSpace API and allows access to properties defined indspace.cfg.
cd [dspace-src]/dspace
mvn package
cp -r [dspace]/webapps/jspui [tomcat]/webapps/
sudo systemctl restart tomcat
“Please use this identifier to cite or link to this item:” section will now show:
https://dspace.iiti.ac.in/handle/123456789/14373
And the base domain (https://dspace.iiti.ac.in) is now configurable in dspace.cfg.