Case 1: I have a virtual machine with Ubuntu and Tomcat 7.x. If i POST data with special characters to the server i'ts ok. I have a filter that run before any servlet and set the encode to UTF-8 request.setCharacterEncoding("utf-8");
Case 2: In the same virtual machine i have other Tomcat 7.x installation (reply). Now i installed the JOSSO 1.8.6 on Tomcat 7.x. After this when i try to submit POST data with special characters the servlet don't decode correctly request.getParameter("reportText");.
I believe that the JOSSO have any filter that run before my Encode Filter and uses the request what makes my filter request.setCharacterEncoding("utf-8") useless.
What i try to resolve the problem:
I have set the URIEncoding="utf-8" at the Tomcat Connector tag (server.xml).
I have used setCharacterEncoding().
I have set the JAVA_OPTS="$JAVA_OPTS -Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8" on tomcat setenv.sh
I checked the HTTP Headers and they are correct (Content-Type=text/plain;charset=utf-8)
I have enable Tomcat filter setCharacterEncodingFilter
Hi Felipe,
JOSSO shouldn't be messing with your encoding. I'd suggest you try with the latest JOSSO Agent release. I'd also try to uninstall the agent from the second tomcat instance in order to determine whether the agent is the piece triggering the issue.
Regards,
Gianluca.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Case 1: I have a virtual machine with Ubuntu and Tomcat 7.x. If i POST data with special characters to the server i'ts ok. I have a filter that run before any servlet and set the encode to UTF-8
request.setCharacterEncoding("utf-8");
Case 2: In the same virtual machine i have other Tomcat 7.x installation (reply). Now i installed the JOSSO 1.8.6 on Tomcat 7.x. After this when i try to submit POST data with special characters the servlet don't decode correctly
request.getParameter("reportText");
.I believe that the JOSSO have any filter that run before my Encode Filter and uses the request what makes my filter
request.setCharacterEncoding("utf-8")
useless.What i try to resolve the problem:
The POST request is generated by client JSP:
Any ideas? It's possible JOSSO causes this behavior?
Thank you.
Last edit: Filipe Queirós 2017-02-08
Hi Felipe,
JOSSO shouldn't be messing with your encoding. I'd suggest you try with the latest JOSSO Agent release. I'd also try to uninstall the agent from the second tomcat instance in order to determine whether the agent is the piece triggering the issue.
Regards,
Gianluca.