On 17.01.2020 04:15, Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Léa,

On 1/16/20 9:33 AM, Lmhelp1 wrote:
Hello,

Thank you for your answers.

I changed <url-pattern>/*</url-pattern> to
<url-pattern>*.jsp</url-pattern> I also un-commented the line:
servletResponse.setContentType("text/html; charset=" +
Finals.S_CHARSET);

It looks like the problem is solved.

[snip]

Shall I leave <url-pattern>*.jsp</url-pattern> as it is, or can
you suggest another pattern?

There is a better solution:

1. Delete the files and removed references to it in web.xml

2. Edit your JSP files and properly set the content-type and encoding
in the @page directive at the top of the file.


I believe Chris had a bit too much - or too little - coffee when he wrote the above, and that he meant :

1. Delete the *filter* and remove all references to it in web.xml
2. ...

The point is : if your application is well-written and follows the standards, you should not normally need this Encoding filter, and everything should "just work". This filter is probably a left-over "patch" from either an older (and incorrect) application version, or some older version of Tomcat.

That is why I first recommended that you remove the whole filter section from your web.xml, and check what happens. Display some pages which /should/ contain some text in non-English languages (meaning with "diacritics" like è, é, à, ü, ö, ..) and if they display correctly, there is nothing else to do.

Only if you /do/ get a wrong display of some of that data, then you should come back here, and try to describe what is wrong. And we could then help you find the root cause.
That would be better than trying to apply a patch over a patch over a patch..


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to