How do I add a response Header?

I figured out, that to close a Jira dialog I would need to make the response header "X-Atlassian-Dialog-Control:DONE" beeing returned somehow.

I already tried to do it via my java class by writing:

HttpServletResponse response = ServletActionContext.getResponse();
response.addHeader("X-Atlassian-Dialog-Control", "X-Atlassian-Dialog-Control:DONE"); //and many variations of this
response.sendRedirect("[URL to issue]");


And when that didn't work I tried to add a Header into the .vm file :

<% Response.AddHeader "X-Atlassian-Dialog-Control:DONE","dialogControl" %>

something like this, again I tried multiple Variations.

The dialog still won't close.

Thanks in advance.

1 answer

2 votes
Colin Goudie Community Champion Apr 25, 2013

Can you just use Chrome's Dev tools to inspect the dialog and find out which parent DOM element the dialog is and just use jQuery to hide() it?

Really, I don't know why you'd want to be rendering what appears to be a servlet or action response inside the dialog. It's far easier to work with AUI dialogs and soy templates + REST I find.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

176 views 0 4
Read article

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