I’m developing a jar library and trying to inject an interceptor from external jar library to Application. For example: External Lib MyExternalInterceptor.java I tried to using AOP in external libs but it’s not working. InterceptorAspect.java In Application using that lib: Application MyConfigurat…
Tag: interceptor
Interceptor throws IOException: UnknownHostException when I turn internet off
With a new version of okhttp(4.9.0, not sure if it was in lower versions) and Retrofit 2.9.0(also lower versions). I started to see in firebase and google analytics reports about UnknownHostException. I tried to repro this crash and found that it is happening when the internet is off or very low quality. I ca…
Java interceptor not getting called
I have a Spring boot application and I am implementing and interceptor in order to log some data. The problem is that is not getting called, I have tried: And then I’ve applied to methods or classes and in both of them doesn’t work: Or Does someone knows what I am doing wrong? Thanks Answer If you…
How to get exception inside ActionInvocation.invoke()
First of all the final purpose is that i’m trying to inject a DAO connection into an SMD context (Ajax) so i’ll ensure that transactions are being Commited (or Rollback), my problem is that i’m not being able to know if the invoke() method throws an exception, I have the following Intercepto…
Getting Result type in Interceptor
I have Struts 2 actions with different (HTML and JSON ) result types. They use common interceptor. If needed to intercept the request, how to return a result based on given action result type? For example, my Action.ERROR forwards to JSP page. If action is JSON type I want to forward JSON error instead. Answe…