Forum Discussion

anil334's avatar
anil334
New Contributor
5 years ago

getting "�" instead of special characters when deployed a war file generated by SOAPUI on tomcat

I have created a war file using soap ui and deployed it to tomcat server.

It is working fine if I run the mockService from SOAP UI but it started giving the "�" instead of special characters the moment I deployed the war file on tomcat.

 

FYI I have already done the below changes but nothing worked:

---- In SoapUI -------------

1) HTTP Settings in SoapUI preferences - Request Compression : none and Response Compression: Unchecked

2) mockRequest.httpResponse.setContentType("application/json;charset=UTF-8") and mockRequest.httpResponse.setCharacterEncoding("UTF-8") added in the scipt.

3) in system properties: file.encoding=UTF8

 

----- In Tomcat Server -------------

1) <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8"/> added in Server.xml

2) Set encoding to UTF-8 in web.xml file present at "\webapps\<ContextApp>\WEB-INF".

 

Still I am getting that issue, If any one has faced the similar problem and was able to fix please share your suggestion/solution.

 

Thanks in advance :)

1 Reply

  • It's a strange behaviour because generally this error occurs when passing a special character without UTF-8 encoding.

     

    And as you have mentioned you have done all the encoding, just check the encoding in the TOMCAT server might be something little mistakenly missed.