What are the advantages and disadvantages of the current Ajax framework? Let's talk about it later:
1. Ajax. js
CopyCode The Code is as follows :/*
Ajax v1.4
Hjf 2009-7-5
*/
Function ajaxdo (){
This. httprequest = NULL;
This. openmethod =
// The getresource method uses UTF-8 to encode the path information. When there are Chinese characters and spaces in the path, it will convert these characters, the obtained path is often not the actual path we want. Here, we call the decode method
Write cookie
Cookie = new cookie ("username", java.net. urlencoder. encode (username, "UTF-8 "));Cookie. setmaxage (50*60); // if this parameter is not set, cookies are not written to the hard disk, but to the memory. They are only available on the
Java enumeration transcoding and java Enumeration
If unified transcoding (tomcat, spring, and so on) is not completed in web projects, garbled characters will inevitably occur.
Various online solutions may not be the right remedy"
So I wrote a small
Graph component FusionChartsFree paid version FusionChartsSuite provides label processing, JSON data format, and other more rich functions, official website: http://www.fusioncharts.com/
Write a JSP tag, a Java file, and a tag definition to avoid
Therefore, you must enter a search keyword in google by using the encoded keyword, for example, "Resolution keyword encoding, encoded "% E8 % A7 % A3 % E6 % 9E % 90% E5 % 85% B3 % E9 % 94% AE % E5 % AD % 97% E7 % BC % 96% E7 % A0 "% 81"
1. parse the
The default encoding of many files is ISO-8859-1, while the default encoding of the Chinese operating system is gb18030, the project code established in this workspace is gb18030. our commonly used encoding is UTF-8, this provides better
Get and Post requests
1. Request LengthRFC does not limit the length of Get and Post requests.However, the browser has restrictions. For example, the IE browser's Get request cannot exceed 2083 characters, and the Firefox browser cannot exceed 65536
Example of second-level interaction in the drop-down box using Ajax and Jquery combined with the database, ajaxjquery
First, we need to set up a database to insert some data into it.
Two tables are required:
Province: province table
City: city table
This article introduces the solution to Chinese garbled characters in jsp get Url requests. If you need it, refer to it.
In jsp, post requests are generally not garbled. If the request is garbled, add the following sentence:
Solution 1
Obtains the entity content of the request message.
Getinputstream and getreader Methods
The getinputstream and getreader methods are used to obtain the binary byte input stream and character input stream.
1. The getinputstream method is used to
I encountered the problem of Ajax garbled code today. I found some materials on the Internet for a long time and tried many methods. I am grateful for the correct method. Address: http://www.blogjava.net/hulizhong/archive/2007/04/21/112416.html
Ajax
In jsp, post requests are generally not garbled. If the request is garbled, add the following sentence:Solution 1 The code is as follows:Copy code Request. setCharacterEncoding ("UTF-8 "); For get requests, if the url contains non-Western
When investigating an error, I accidentally found that some links on the HTML page contain +, decompiled the tag, and found that the java.net. urlencoder method was called.
Public static string encode (string S, string ENC)
From the code, we can
Summary of Java Network programming
Basic concepts of Network programming
1.OSI and TCP/IP system model
2.IP and Port
Solves the problem of positioning that the article mentions at the beginning.
IP can uniquely identify a single computer in the
This section mainly introduces two points: 1. cache problems 2. Chinese problems cache problems:
What is cache problems? That is, when the input content of the browser is the same, that is, the requested URL is the same, the browser will read the
In this case, jQuery and Servlet technologies are used to determine whether the user name exists, so that readers can understand how jQuery calls the server background. It also provides solutions to solve Chinese garbled characters and how to avoid
In this case, jQuery and Servlet technologies are used to determine whether the user name exists, so that readers can understand how jQuery calls the server background. It also provides solutions to solve Chinese garbled characters and how to avoid
Server JSP encoding Pageencodingis the encoding of the JSP file itself,The first stage is the JSP compiled into. Java, which will read the JSP according to the pageencoding settings (JSP file encoding, pageencoding is consistent), the result is the
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.