JBoss编码utf 8
我的列表网格没有正确显示变音符号的问题,我发现当我从java插入数据库时,值已经被错误。
这里的post有帮助,我改变了我的项目属性 – >文本编码 – >其他 – > UTF-8,这解决了我的问题。 事情是这只能解决我在本地的问题。
我需要做的是在我的Jboss服务器上也以某种方式设置编码。 我只能访问此面板,因为我无法直接访问配置文件。 我可以从这里开始吗?
对于这个愚蠢的问题,任何建议都表示赞赏和抱歉,但我尝试了所有我能想到的但没有成功的事情。 谢谢。
这可以帮助您https://community.jboss.org/message/643825#643825
可以肯定的是,你有像这样的pageEncoding吗?
<%@page contentType="text/html" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
也许这对某些人有用:
Window > Preferences > General > Workspace > Text file encoding
您可以创建一个截取应用程序中每个请求的filter,因此在此filter中可以设置字符编码。 developer.jboss上有一个主题。 filter可以如下:
@WebFilter(filterName = "CharacterEncodingF", urlPatterns = {"/*"}) public class CharacterEncodingF implements Filter { public CharacterEncodingF() { } /** * * @param request The servlet request we are processing * @param response The servlet response we are creating * @param chain The filter chain we are processing * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet error occurs */ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { request.setCharacterEncoding("UTF-8"); chain.doFilter(request, response); } @Override public void init(FilterConfig filterConfig) throws ServletException { } @Override public void destroy() { } }
- 谷歌应用引擎1.6.4在本地较慢?
- 无状态服务器如何工作?
- Java:如何创建一个需要扩展类并实现接口的数据类型的generics类?
- GWT服务exception日志记录的最佳实践
- NoSuchMethodError:org.apache.http.conn.scheme.Scheme。(Ljava / lang / String; ILorg / apache / http / conn / scheme / SchemeSocketFactory;)V
- GWT编译器无法在IntelliJ IDEA中找到依赖模块的源
- 加快GWT项目的更新速度
- 如何在Intellij IDEA中正确配置JBoss? 我收到错误:未指定服务器实例
- 手工创建GWT项目目录