易截截图软件、单文件、免安装、纯绿色、仅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位算术运算符

 
1)&:与运算,将两个数分别转化成补码,然后进行运算(全1得1,有0出0)。
2)!:非运算,将数字自身取反(转化成补码,按位取反——1变0,0变1)。
3)<<:左移运算符,将某个十进制转换成二进制之后末尾的n个二进制数以此往左移动,溢出的n位用0在末尾补足。
4)>>:带符号右移运 ......

java获取SQL查询结果集中的行数和列数

http://cheneyph.javaeye.com/blog/477829
         在Java中,获得ResultSet的总行数的方法有以下几种。
第一种:利用ResultSet的getRow方法来获得ResultSet的总行数
Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABL ......

java中对date相关操作

String startTime, String endTime;
Date start = null;
Date end = null;
Date startTimeStamp = null;
Date endTimeStamp = null;

try {

SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd");
......

关于c#和java中数组的比较

 java中使用二维 数组
ognNf_v
public class Array2D...{
m @EvM)y0e2r
s
    public static void main(String[] args)...{JAVA中文站社区门户 ~j!lSR ^ z5bR5O
        int myInt[][]=new int[5][10];
@XH3ao\
        ......

Solaris下java package的编译与运行

这几天遇到了java的package问题(这种问题只是在cmd命令行模式下会遇到,如果用eclipse就不会有这种问题),把java中的package编译运行的问题总结一下,作为备忘。
    首先,如果你有两个类:
   (1)A.java
        import edu.ustc.*;
  &n ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号