Lately, I've been encountering a major issue in my application.
Whenever I search for a value in the application and my session has expired, the application correctly redirects me to the login page.
However, upon logging back in, instead of being directed to the home page, the application displays the results of the last GET ajax call that I made along with the resultant JSON on the browser.
The code snippet I am working with is shown below;
// Document Ready() Starts
$("#grid_id").jqGrid({
url :"search/getHouseholdHistoryList",
async : false,
type: 'GET',
datatype: 'json',
postData: {
searchHHID: function() { return $("#txt_SearchID").val(); },
filterKey: function() { return $('#ulSearch_TypeOfID li.selected').attr('value') }
},
colNames:mainGridColNames,
colModel: [
{ name:'incidentID', index:'incidentID', width:110,sortable:true},
{ name:'incidentCreatedDate', index:'incidentCreatedDate', width:160, sortable:false},
{ name:'incidentSummary', index:'incidentSummary', width:482,sortable:false},
{ name:'incidentStatus', index:'incidentStatus', width:120, sortable:false},
{ name:'actionLink', index:'actionLink', width:100, sortable:false}
],
viewrecords: true,
//autowidth:true,
width: '100%',
height:'150',
rowNum: 10,
rowList:[10,20,30],
rownumbers: false,
sortorder: "desc",
ignoreCase: true,
loadonce: true,
jsonReader: { repeatitems: false },
pager: 'gridpager',
direction:'ltr'
}).jqGrid('navGrid','gridpager',
{edit:false, add:false, del:false, search:true, refresh:true});
//Document Ready() Ends
I'm utilizing -Spring MVC. -JSP -jQuery -Ajax
Please advise if any additional information is needed.