How to redirect from servlet to project tab panel

I call servlet from project tab panel (using AJAX ) update database from servlet.

now i want to come back on project tab panel

i use

resp.sendRedirect(req.getContextPath() + "browse/TEST?selectedTab=com.jira.example.example_ao:wbs-project-tab-panel");

but its not working i want project tab panel page get refreshed

1 answer

1 accepted

0 votes
Accepted answer

Hi Sachin,

I have a query : if you are doing AJAX call then why you are doing page refresh (which is similar to form submission).

you should understand the AJAX & Form submission concept first.

Again , can you elaborate your problem in detail ?

Hi Dipti

I have project tab panel in that i display AO table.from this project tab panel i called servlet throgh ajax on event. in servlet i make changes on AO table that changes should be reflecated on project tab panel from which i called servlet

database get modified but that changes is not shown on project ab panel After refreshing that page it show modified changes

 var data;
		var baseURL=document.getElementById("baseURL").value;
		$("#issuetable tbody").sortable(
			stop: function( event, ui ) {
				var draggedItem = $(ui.item).find('td').eq(1).text();
				var destinationDI=$(ui.item).prev().find('td').eq(1).text();				
				  url: "${baseurl}/plugins/servlet/WBS_DNDUpdate",
				  type: "GET",
					data: { source: draggedItem, destination: destinationDI },
				    dataType: "json",

this is Ajax script which call servlet after event

on servlet
String url = ComponentAccessor.getApplicationProperties().getString(APKeys.JIRA_BASEURL)+"/browse/TEST";
		System.out.println("==url=="+ url);

use this code for redirecting to project tab panel . the class of panel get executed after redirecting but updated data is not able to send to .vm file of that panel

so that updated data is not show on tab panel .

after manually refreshing page it shows.

Hi @Sachin,

The problem here is the ajax call you are making .

a) Just do a direct form submission with form tag , which in turn will refresh the complete page.

b) please see $.get() in the link if it can be helpful :


Use this ,

var vBrowser ='${req.contextPath}/secure/AddProject.jspa?projectstr='+selectedProjectStr,"_self");



instead of jQuery.ajax()

Hi Dipti

Thanx for u r help. this link very helpful

                  url: "${baseurl}/plugins/servlet/WBS_DNDUpdate",
                  type: "GET",
                    data: { source: draggedItem, destination: destinationDI },
                    success:  function() {location.reload();},
                    dataType: "json",

success: used for calling function after successfull request.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,910 views 19 22
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