How to add or modify JSP with JIRA 7

Before JIRA 7, it was possible to add or modify JSP in JIRA Install folder.

The JSP was recompiled by Tomcat as Class into <tomcat-install>\work\Catalina\localhost_\org\apache\jsp.

Now with JIRA 7, the installation comes with all JSP files already compiled into atlassian-jira\WEB-INF\classes\jsp?

The provides JSP files are present but never more accessed.

  • If we add a new JSP, it is never compiled,
  • If we modify an existing JSP, it is never recompiled,
  • if we suppress a JSP, it is also never recompiled and make fails the page access.

Is there an option into JIRA or Tomcat in order to retrieve the same behavior as previous versions ?

Thanks

Vincent

7 answers

How to do this in Jira 7:
Inside JIRA_HOME/WEB-INF/web.xml, remove the servlet and servlet-mapping for the jsp you want to edit.

Detailed example for login.jsp (it works the same for any other jsp):
1. Inside JIRA_HOME/WEB-INF/web.xml remove/comment

&lt;servlet&gt;
	&lt;servlet-name&gt;jsp.login_jsp&lt;/servlet-name&gt;
	&lt;servlet-class&gt;jsp.login_jsp&lt;/servlet-class&gt;
&lt;/servlet&gt;

and

&lt;servlet-mapping&gt;
	&lt;servlet-name&gt;jsp.login_jsp&lt;/servlet-name&gt;
	&lt;url-pattern&gt;/login.jsp&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;

2. Edit JIRA_HOME/login.jsp (same approach as for Jira 6)
3. Restart Tomcat (this is because web.xml was changed)

Just want to mention that an another pre-compiled jsp may

&lt;%@ include file="the_tweaked_jsp_page.jsp" %&gt;


the tweaked one. And so it should be also commented/deleted as in example above to make it work.

If you arrived here trying to edit the global headers in JIRA, my comment on another JIRA doc page may be useful.

Hi Alex,

In JIRA 7 , how do I add new jsp files. Please guide me. Its little urgent. Your help is highly appreciated

we have a lot of customized JSPs as well. How can we compile them for JIRA 7 ?

 

A feature request on a documentation for this to guide users have been created here :

https://jira.atlassian.com/browse/JRA-59587

 

Do cast a vote and leave a comment on the ticket to emphasize the importance of this request to your side. 

@Dieter Greiner, my answer below might help you.

@Alexandru Luchian Constantinescu thank you!

You can do it by modifying jspweb.xml , comment out 

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

I have tried the same the sever not getting started . Is there any other alternatives for modifying the login pages and atlassian logo

Your solution doesn't work on production server.

How to force jsp redeploy on production server?

 

Thanks

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted 6 hours ago in United States

Atlassian acquires AgileCraft

         Good Day, Bad bad traffic, not sure why!!!! 1/2 hour commute took me 2 hours today 🤯 What helped me is that I kept browsing LinkedIn until...

30 views 1 0
View post

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you