How to make changes to JSP files always reflected after the service restart

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

The information on this page relates to customizations in JIRA Applications. Consequently, Atlassian Support cannot guarantee the provision of any support for the steps described on this page as customizations are not covered under Atlassian Support Offerings. Please be aware that this material is provided for your information only and that you use it at your own risk.

Also, please be aware that customizations done by directly modifying files are not included in the upgrade process. These modifications will need to be reapplied manually on the upgraded instance.

Summary

When working on customization tasks, it is sometimes beneficial to directly update JSP pages in Jira with a custom content. However, upon modifying the respective JSP template, the changes may not be reflected in Jira even after the service has been restarted.

Environment

Any Jira Server/DC installation where JSP customization is needed. 

Solution

Jira is bundled with Tomcat application server that has a way of caching JSP pages on the fly and persisting this cache between application restarts. The easiest solution would be to remove JSP pages from the caching completely, which will make editing them easier as changes will be automatically reflected even without the service restart.

To remove specific JSP pages from caching the following files needs to be modified: JIRA_INSTALL/atlassian-jira/WEB-INF/web.xml

For example, to be able to modify login.jsp, comment out the following servlet-mapping:

<!--<servlet-mapping>
<servlet-name>jsp.login_jsp</servlet-name>
<url-pattern>/login.jsp</url-pattern>
</servlet-mapping>-->

Restart your Jira service after that change, and after that any changes to login.jsp should be automatically reflected without the service restart.

Updating Jira version may overwrite modified JSP files. Any customization will need to be manually added back if files have been overwritten with vanilla versions.



Last modified on Mar 10, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.