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

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

このページの情報は、Jira アプリケーションのカスタマイズに関連しています。アトラシアン サポートの提供内容にカスタマイズは含まれていないため、アトラシアン サポートでは、このページで記載されている手順に対するサポートを保証できません。この資料は情報提供のみを目的としており、記載内容は自己責任の下で行っていただく必要があります。

また、ファイルの直接変更によって行われるカスタマイズは、アップグレード プロセスには含まれない点にご注意ください。このような変更は、アップグレード後のインスタンスで手動で再適用する必要があります。

要約

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.

環境

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

ソリューション

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

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.