Redirect domain to login.jsp instead of system dashboard

Tiffany Owen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 18, 2017

I don't ever want to use the system dashboard. Instead, whenever a user goes to jira.mycompany.net, I would like them to automatically redirect to the login.jsp page instead of the system dashboard. For example,

When going to jira.mycompany.net, redirect to:

jira.mycompany.net/login.jsp

instead of:

jira.mycompany.net/secure/dashboard.jspa.

I have modified the JIRA/atlassian-jira/default.jsp file to forward to /login.jsp (see code below). However, my domain URL still redirects to the system dashboard. Is this not correct?

code-example.PNG

4 answers

1 accepted

1 vote
Answer accepted
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 18, 2017

It looks like JIRA 7 doesn't read the default.jsp file:

Request for documentation on how to tweak JSP in JIRA 7

Please see this comment by Alexandru Luchian Constantinescu for an alternative strategy.

Tiffany Owen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 18, 2017

This worked for me. Thanks so much!

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 18, 2017

That's great! I appreciate your following up to let the Community know it works.

Nicolas_Grussenmeyer February 9, 2018

Hi Tiffany,

Could you please indicate me which jsp did you remove from "JIRA_HOME/WEB-INF/web.xml" to make it work?

I'm trying to achieve the exact same thing on our Jira.

thanks!

Tiffany Owen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2018

Hi Nicolas, I actually found a better solution, one that avoided having to change any server files. Just added this to our announcement banner:

<script>
if(jQuery('#header-details-user-fullname').text().indexOf(" ") ==-1 && window.location.href.indexOf("/secure/Dashboard.jspa") != -1)
{ window.location = contextPath+"/login.jsp" }
</script>

Let me know if it works for you! 

Like # people like this
Nicolas_Grussenmeyer February 9, 2018

Hi Tiffany,

It works as required. Thank you very much for this quick answer!

marcus August 15, 2018

The announcement banner method works well.  But then what can you do when you want to use the announcement banner to warn users about upcoming maintenance.

Neeta Dubey April 5, 2019

@Tiffany Owen : This is great. It worked for me.

Danny Jager December 5, 2022

@Tiffany Owen, The script in the announcement banner, worked great on JIRA Server / Data Center 8.X, but it doesn't work anymore on version JIRA Data Center 9.4 (maybe it stopped working on previous 9.X versions).
Can you please provide an updated script?
Thanks!

Like bitbucket4isd likes this
3 votes
koh November 2, 2021

For future jira admins with this problem, 

See this ticket https://jira.atlassian.com/browse/JRASERVER-65521

Here are the steps required for adding a dark feature in Jira:

  • Login as an administrator and go to: [BASE-URL]/secure/SiteDarkFeatures!default.jspa
  • In the Enable Dark Feature text field add public.access.disabled
Srikar Namala December 13, 2022

This is Super Work around!

2 votes
Tiffany Owen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 16, 2018

Hi Marcus, this method still allows you to post announcements while having the code in the banner as well.

Jack Griffith April 11, 2019

I was able to use the banner to force login via the secure dashboard like this as well, but then if I follow a saved link, like to an issue or a board, after logging in I don't get forwarded to that link location. Any suggestions on how to make it work?

Thanks,
Jack

0 votes
Vedant Kulkarni July 29, 2019

 How to achieve this using Jira Java API by embedding own plugin in jira instance?

Michael Aglas July 17, 2022

I woud guess you provide a JavaScript resource and place it in location like atl.general or so, if I am not mistaken.

Suggest an answer

Log in or Sign up to answer