Tagged articles
HttpServletRequest
10 articles · Page 1 of 1
Passing a HttpServletRequest to a regular thread in Spring Boot causes Tomcat to recycle the request after the servlet returns, making parameters unavailable and yielding null values, so you must use the servlet async API (startAsync and complete) to keep the request alive.
HttpServletRequestJavaSpring Boot
0 likes · 18 min read

This article explores how SpringBoot 2.6.12 injects HttpServletRequest into controllers using JDK dynamic proxies and ThreadLocal, detailing the underlying ObjectFactoryDelegatingInvocationHandler, RequestObjectFactory, RequestContextHolder, and DispatcherServlet processing flow with code examples and explains why injecting HttpServletRequest and HttpServletResponse in a controller is safe.
DispatcherServletHttpServletRequestJava
0 likes · 7 min read

This article explains how to retrieve a client’s real IP behind proxies, choose the appropriate forwarding header, and use the open‑source ip2region library to map the IP to a geographic location, with complete Java and Spring Boot code examples.
HttpServletRequestIP GeolocationJava
0 likes · 17 min read

This article explains how to obtain a user's IP address from an HttpServletRequest, handle proxy headers, and use the ip2region library to map the IP to province, city, or country, covering setup, Maven integration, code examples, caching strategies, and performance testing.
HttpServletRequestIP addressJava
0 likes · 15 min read

This article explains how to obtain a client's IP address from HttpServletRequest in Java, convert it to geographic location using the ip2region library, and demonstrates various query methods, caching strategies, and Maven integration for efficient backend IP geolocation.
HttpServletRequestIP GeolocationJava
0 likes · 12 min read

This article explains how to obtain a user's IP address from an HttpServletRequest, introduces the ip2region offline IP‑location library, demonstrates Maven integration and multiple Java query implementations—including file‑only, vector‑index, and full‑memory caching—while providing benchmark and testing instructions.
HttpServletRequestIP GeolocationJava
0 likes · 15 min read

Passing an HttpServletRequest into an asynchronous thread in Spring Boot can cause mysterious parameter loss and request‑recycling bugs, because Tomcat reuses request objects; the proper solution is to employ the servlet's startAsync and AsyncContext.complete methods for safe async processing.
AsyncDebuggingHttpServletRequest
0 likes · 20 min read

This article explains how to obtain a user's IP address from an HttpServletRequest in Java, convert it to geographic location using the ip2region library, and provides detailed code examples, Maven setup, caching strategies, and performance testing procedures for backend developers.
BackendHttpServletRequestIP address
0 likes · 15 min read

This article explains how SpringBoot injects HttpServletRequest into controllers using a JDK dynamic proxy and ThreadLocal storage, tracing the request object from the ObjectFactoryDelegatingInvocationHandler through RequestObjectFactory, RequestContextHolder, and the FrameworkServlet's processRequest lifecycle.
HttpServletRequestSpringBootThreadLocal
0 likes · 7 min read

This article explains various ways to obtain the HttpServletRequest object in a Spring MVC web application, evaluates their thread‑safety through concurrent testing, and compares the advantages and drawbacks of each approach to help developers choose the most efficient solution.
HttpServletRequestJavaSpring MVC
0 likes · 12 min read
