Hi team,
I wanna redirect the request that contains "X-Requested-With: XMLHttpRequest" in the header. I know cant i do response.sendRedirect(url) method in ajax call, so i tried:
httpRequest.getRequestDispatcher("myservlet").forward(req, res);
//or
httpRequest.getRequestDispatcher("myservlet").include(req, res);
but the same problem, the client is not redirected to my servlet.
and too tried to return a xml response with this:
<?xml version="1.0" encoding="UTF-8"?><partial-response><redirect url="jiraurl/plugins/servlet/nopermission"></redirect></partial-response>
but nothing happens.
I'm stuck in this problem for weeks, if have any that can help me i will be very grateful.
Thanks.
Hi @JonasGomes
Hi Nit Haimov, Thanks for answering.
When my filter is triggered on a certain occasion (url == myregex), the user should be forwarded to my servlet.
That's basically what I need to do. But my approach for Ajax Async request does not work.
I'll also ask in the other forum.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your servlet is something you created from your own plugin right?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So in your ajax call use:
window.location.replace(AJS.params.baseURL+"/plugins/servlet/myservlet");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, i think you do not what i meant. Sorry. Awful english.
I will detail my problem on community developer.
Thanks for you attention.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.