Recently in parsing a pile of files, there are GBK, UTF-8, encountered garbled problem in the process, I believe many people who have done the relevant work have similar experience.
There are several areas related to Chinese encoding:1. encoding
1. Copy the project folder or war package directly to Tomcat's webapps.
2. Create an XML file under Tomcat \ conf \ Catalina \ localhost
The modified content is as follows:
Where:
PATH is the project name after http: // localhost: 8080/
I wrote a project in Java for the first time a while ago. It is less than two months since I carefully studied Java. Many times, I have to learn Java and write projects. But because of this, I deeply realized the simplicity and convenience of Java.
1. understanding of basic conceptsAbsolute path: the absolute path is the real path of the file or directory on your home page on the hard disk (URL and physical path), for example:C:/XYZ/test.txt represents the absolute path of the test.txt file.
To put it simply, Java's serialization mechanism verifies version consistency by judging the serialversionuid of the class at runtime. During deserialization, the JVM compares the serialversionuid In the byte stream with the serialversionuid of the
Java-WCF Communication Example
Let's just move on to the source code: http://download.csdn.net/detail/centre10/3612982. The source code is here.
Java and WCF Communication Example... 1
I. Summary... 1
II. Environment description... 2
3. Compile
The container class can greatly improve the programming efficiency and programming capability. In Java2, all containers are re-designed by Sun's Joshua Bloch, enriching the functions of the container class library.
The Java 2 Container class
1, Timer
Timer is essentially a multi-thread. It can be seen from its class:Java code1. Private timerthread thread = new timerthread (Queue );
It is applicable to time-related operations. After a certain action is executed, an action is executed at
The Singleton mode limits only one instance for a class, and the object Pool Mode limits the number of class instances. The object pool class is like an object administrator. It stores instances of classes with a limited number of instances in the
There are two types of threads in Java: User thread and daemon thread)
For example, Any daemon thread is a nanny of all non-daemon threads in the JVM:
As long as there is still any non-daemon thread in the current JVM instance that is not finished,
Gidbaglayout:(1) gridbagconstraints. gridwidthgridbagconstraints. gridheightSpecify the number of units in the display area row (for gridwidth) or column (for gridheight) of the component. The default value is 1. The following is an example of
Recently I was working on a project similar to a mobile phone for everyone. After I wrote it in the background, I used JSP and the jar package used was smartupload. It is estimated that Java Web users should know about this.
Then I tested it
The object-oriented feature is that programmers can design required classes based on specific problems to solve problems. It has features such as encapsulation, inheritance, and polymorphism, including object-oriented analysis, object-oriented
Recently I learned advanced ext usage and found that direct, one of the new features in ext 3. X, looks good. Search online and find that directjngine has good support for ext direct. Therefore, directjngine000012.16.1.3.zip is downloaded from the
Calculate the maximum common divisor and least common multiple of two numbers.If a natural number A can be divisible by natural number B, A is called a multiple of B, and B is the approximate number of. The common divisor of several natural numbers
Java. Lang. Exception
Root exception. Used to describe what the application wants to capture.
Java. Lang. illegalaccessexception
Illegal access exception. When an application tries to create an instance of a class, access this class attribute, and
When two processes perform remote communication, they can send different types of data to each other. Regardless of the type of data, it is transmitted on the network in the form of binary sequence. The sender needs to convert the Java object into a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service