You don’t. You close this one and create a new one. It does TCP connection pooling and keepalive behind the scenes.
More Related Contents:
- How to use java.net.URLConnection to fire and handle HTTP requests
- Java – sending HTTP parameters via POST method easily
- Getting request payload from POST request in Java servlet
- How do I do a HTTP GET in Java? [duplicate]
- HttpServletRequest to complete URL
- Accessing post variables using Java Servlets
- How to enable wire logging for a java HttpURLConnection traffic?
- How can I read an HttpServletReponses output stream?
- How to get response body using HttpURLConnection, when code other than 2xx is returned?
- HTTP headers encoding/decoding in Java
- Read error response body in Java
- How to modify the header of a HttpUrlConnection
- How to get host name with port from a http or https request
- Can I override the Host header where using java’s HttpUrlConnection class?
- Java Http Client to upload file over POST
- In the context of Java Servlet what is the difference between URL Rewriting and Forwarding?
- Ordering of values in HttpServletRequest.getParameterValues()
- Android’s HttpURLConnection throws EOFException on HEAD requests
- caching images served by servlet
- Disable all default HTTP error response content in Tomcat
- Should one call .close() on HttpServletResponse.getOutputStream()/.getWriter()?
- POST request send JSON data Java HttpUrlConnection
- How to upload files on server folder using jsp [duplicate]
- Which compression (is GZIP the most popular) servlet filter would you suggest?
- Get parameter sent via jquery ajax in Java Servlet [duplicate]
- Compile error: package javax.servlet does not exist
- Why do you have to call URLConnection#getInputStream to be able to write out to URLConnection#getOutputStream?
- Session TimeOut in web.xml
- Regarding thread safety of servlet [duplicate]
- Logging response body (HTML) from HttpServletResponse using Spring MVC HandlerInterceptorAdapter