0

我使用 freemarker 作为 hippo cms 的模板引擎。我非常关注http://www.onehippo.org/library/concepts/web-application/enabling-freemarker-template-support.html 不幸的是,所有表单都存在编码问题。

关于使用 Spring MVC 时如何在 Freemarker 视图中设置内容类型?我再次检查了我的 utf-8 配置。德语变音符号在请求参数中仍然显示为乱码(在 spring CharacterEncodingFilter 中调试)。

将表单的字符集更改为以下作品。

<form action="${actionLink}" method="post" accept-charset="ISO-8859-1">...</form>

这意味着我猜河马中的某些东西仍然配置为使用 ISO-8859-1。

4

1 回答 1

1

长话短说:来自 spring CharacterEncodingFilter 的过滤器映射是在 hstFilter 之后定义的,这绝对没有意义。

提醒:过滤器的排序由过滤器映射而不是过滤器声明决定

于 2015-10-06T13:06:22.083 回答