Please Note, I am not a Java developer so my question may have some heart breaking assumptions & invalid piece of code.
I have an interceptor which takes care of login authentication.
<global-results>
<result name="login">/admin/login.jsp</result>
</global-results>
As shown, it redirects to login.jsp when authentication fails i.e. the return value is "login" (in this case)
What I want to achieve is, I return some other value (say "loginAjax") and it should not send an HTTP 302, instead it should return back a JSON response.
I don't know if that possible at all or not. I have this other piece in struts.xml which returns json when a particular value is returned from Action.
<result name="success" type="json">
<param name="includeProperties">
return_id, return_message
</param>
</result>
I don't know how should I tie both the pieces together and get it working for the same interceptor.