易截截图软件、单文件、免安装、纯绿色、仅160KB

java web开发中防止乱码的方法

1.在系统中导入一下source
SetCharacterEncodingFilter.java
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements.  See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
//******************************************************
//システム名 販売システム
//機能名 日本語文字化け防止
//クラス名 SetCharacterEncodingFilter.java
//
//
//@author xiehl (Tomcatから転載)
//@version 2009.07.13 新規作成
//
//******************************************************
/**
 * <p>Example filter that sets the character encoding to be used in parsing the
 * incoming request, either unconditionally or only if the client did not
 * specify a character encoding.  Configuration of this filter is based on
 * the following initialization parameters:</p>
 * <ul>
 * <li><strong>encoding</strong> - The character encoding to be configured
 *     for this request, either conditionally or unconditi


相关文档:

java入门

 Java学习从入门到精通 
一、 JDK (Java Development Kit) 
JDK是整个Java的核心,包括了Java运行环境(Java Runtime Envirnment),一堆Java工具和Java基础的类库(rt.jar)。不论什么Java应用服务器实质都是内置了某个版本的JDK。因此掌握JDK是学好Java的第一步。最主流的J ......

java中 最常用的String 的用法

String : 字符串类型
一、构造函数
String(byte[ ] bytes):通过byte数组构造字符串对象。
String(char[ ] value):通过char数组构造字符串对象。
String(Sting original):构造一个original的副本。即:拷贝一个original。
String(StringBuffer buffer):通过StringBuffer数组构造字符串对象。
例如:
byte[] b = ......

Java HashMap和TreeMap的排序问题总结

Map存储的是key->value的值对,key的值是唯一的,而value的值可以重复。通常使用的是HashMap或TreeMap,如果考虑性能,使用HashMap。TreeMap使用红黑树实现,保留有key值顺序性,会自动按照key值排序。
默认是按照key值的升序排序,key值必须实现 Comparator接口。如果希望按找一定规则排序,则需要重新定义compare函数 ......

我的Java学习之路2009

-------------------------------2009年3月19日开始-----------------------------
下载JDK Myeclipse Netbeans JBulider并安装
孙鑫 基础讲解
马士兵 基础讲解
马士兵 坦克大战 (单机版本! 包括图片版)
郭克华 J2ME -----------------------------------2009年5月2日------ ......

Linux下Java环境变量的设置

如果想让所有用户share:
emacs -nw /etc/profile
然后在未尾加入
#set java environment
set JAVA_HOME=/usr/java/jdk1.5.0_16
set PATH=.:$JAVA_HOME/bin:$PATH
export PATH JAVA_HOME
如果仅当前用户使用:
把上面的加入用户目录下的.bash_profile或.bash-rc
然后运行source /etc/profile生效 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号