There was an addition in release 8.9: Core.http().registerHttpRequestInterceptor(...)
https://docs.mendix.com/releasenotes/studio-pro/8.9
I am not sure what your goal is, but maybe that could be a starting point?
I’m using v8.8.1.
I created a new class in Eclipse.
public class MyAppInterceptor extends RequestHandler {
protected void processRequest(IMxRuntimeRequest arg0, IMxRuntimeResponse arg1, String arg2) throws Exception {
Core.getLogger("JavaAction").critical("Interceptor invoked......");
and in my Java action class..I ran my app. no error...but the control did not go to the above code, why??
// BEGIN USER CODE
Core.getLogger("JavaAction").critical("Java Action invoked......");
RequestHandler requestHandler = new MyAppInterceptor();
Core.addRequestHandler(“localhost”, requestHandler);
//or I tried below line as well..
MyAppInterceptor myAppInterceptor = new MyAppInterceptor();
Hi Sekar,
Check if what Michiel suggested solution works.
Otherwise, you can do it like perform the action needed after login immediately and if something fails, you could logout the user with a custom logout java action.