I am trying to send a POST
request from browser to my server(local host). My request URL is :
http://localhost:8080/myPath/myServlet?requestData={
I apologize for not answering questions seriously before.
1.Maybe it caused by special characters.You can get details from this url。https://bz.apache.org/bugzilla/show_bug.cgi?id=60594
solve it by:
encodeURIComponent(JSON.stringify(data))
or change your tomcat version to 7.0.67 or lower.
According to developers's opinion, tomcat developers in the following versions set the option to allow |,{,}
.
Get detail http://tomcat.apache.org/tomcat-8.0-doc/config/systemprops.html#Other
The new environment variable will be included in: - trunk for 9.0.0.M18 onwards
8.5.x for 8.5.12 onwards
8.0.x for 8.0.42 onwards
7.0.x for 7.0.76 onwards2.
Another reason maybe that Request header is too large.You can solve this by modifying the server.xml
.
Hope it works for you!