setcharacterencodingfilter.java

来自「Jive是基于JSP/JAVA技术构架的一个大型BBS论坛系统,这是Jive论坛」· Java 代码 · 共 39 行

JAVA
39
字号
/** * $RCSfile: SetCharacterEncodingFilter.java,v $ * $Revision: 1.1 $ * $Date: 2002/04/30 18:26:27 $ * * Copyright (C) 1999-2001 CoolServlets, Inc. All rights reserved. * * This software is the proprietary information of CoolServlets, Inc. * Use is subject to license terms. */package com.jivesoftware.forum.util;import javax.servlet.*;import java.io.IOException;import com.jivesoftware.forum.*;/** * Set the character encoding to be the be the global Jive Forums one. * * @see JiveGlobals#getCharacterEncoding */public class SetCharacterEncodingFilter implements Filter {    public void init(FilterConfig filterConfig) throws ServletException {        // do nothing.    }    public void doFilter(ServletRequest request, ServletResponse response,            FilterChain chain) throws IOException, ServletException    {        request.setCharacterEncoding(JiveGlobals.getCharacterEncoding());        chain.doFilter(request, response);    }    public void destroy() {        // do nothing.    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?