Retrieving IMxRuntimeRequest and IMxRuntimeResponse from java action

1
Is it possible to retrieve the IMxRuntimeRequest and IMxRuntimeResponse from a Mx standard Java action? I know this is possible in a custom servlet but I can't find a way to achieve this from a standard Java action.
asked
2 answers
1

You can get the current requestID from your IContext, if that's what you're after.

answered
0

Related

 

        com.mendix.systemwideinterfaces.core.IContext ctx=getContext();
        java.util.Optional<com.mendix.m2ee.api.IMxRuntimeRequest> orrq=ctx.getRuntimeRequest();
        com.mendix.m2ee.api.IMxRuntimeRequest rrq=orrq.orElse(null);
        if(rrq!=null){
            java.lang.String str_hdrK="User-Agent";
            java.lang.String str_hdrV=rrq.getHeader(str_hdrK);
            return str_hdrV;
        }else{
            return null;
        }        com.mendix.systemwideinterfaces.core.IContext ctx=getContext();
        java.util.Optional<com.mendix.m2ee.api.IMxRuntimeRequest> orrq=ctx.getRuntimeRequest();
        com.mendix.m2ee.api.IMxRuntimeRequest rrq=orrq.orElse(null);
        if(rrq!=null){
            java.lang.String str_hdrK="User-Agent";
            java.lang.String str_hdrV=rrq.getHeader(str_hdrK);
            return str_hdrV;
        }else{
            return null;
        }

 

answered