Quantcast
Channel: Active questions tagged servlets - Stack Overflow
Viewing all articles
Browse latest Browse all 675

Servlet getParameter() returns null for form-data [duplicate]

$
0
0

I am sending a POST request to my localhost Tomcat 8.0 Servlet 3.1 web application but request.getParameter("") returns me null.

This is how I make my request.Using PostMan

I am using PostMan to perform my POST request. And on the java side, I am calling request.getParameter("code") and this gives me null. Same goes for qwe field. I am not using any framework. It's raw servlets. This is only a back-end so it's all about handling the data and responding to client.

If I use "x-www-form-urlencoded", I am able to retrieve the parameters through getParameter() call but I still want to know why I am not able to get form-data.

Thanks.


Viewing all articles
Browse latest Browse all 675

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>