HTTP
- 04 August
How to check if session exists or not in java
In this post, we will see how to check if HTTP session exists or not in java. Â Sometimes you need to check if session already exists or not and based on that perform some operations. If you use below code to get the session: [crayon-673f9c0260344818396684/] You will never get above session object as null because […]
- 01 August
How To Get HTTP Response Header In Java
In this post, we will see how to get HTTP response header in java. We have already seen how to send get or post request in java. I am using same example to demonstrate to get HTTP response header. [crayon-673f9c026061b168733510/] [crayon-673f9c0260621361749169/] When you run above code, you will get below output: [crayon-673f9c0260623017998656/]
- 01 August
How to get HTTP Request Header In Java
In this post , we will see how to get HTTP request header in java. Sometimes, you want to print request header values. It is very simple to do it. You first need to get request object, then call getHeaderFields() Â on it to get all request header values. [crayon-673f9c02606e7511062518/] Spring MVC: If you are using […]
- 27 July
How to send HTTP request GET/POST in Java
In this post, we will see how to send HTTP Get/Post in java. There are many times when you need to send http get or post request. You can use HttpURLConnection for sending get/post request in java. It belongs to java.net package. HttpURLConnection example: We are going to send get or post request to URLs […]