POST method replacing the "+" characters

Hei. I use the POST method to send some information from the JSP to the Servlet. I can’t understand why, when I send the "+" character through the POST method, it will be replaced by a space character. Example: when I type the following line: 4 + 5 → The servlet will return 4 5; it replaces all the + signs. How can i fix this? I really need the + characters to be visible, because after that I need to evaluate the expressions.

+3
source share
4 answers

Form variables are sent to the URL. The "+" plus symbol is (one) URL space encoding.

See also: AJAX POST and plus sign (+) - how to encode?

, URL- Javascript, "%2B".

+3

URLEncode . - , + .

+1

, , , URL, W3 HTTP. POST, () , . "+" "%2B".

+1

URL- + . URL-, :

4+5

4%2B5
+1

All Articles