Chinese garbled characters have plagued JSP
ProgramClerk, I often see this situation during programming;
After a piece of writing experience and absorbing his experience, the situation of "garbled characters in passing Chinese parameters through
I checked the information about the problem online:
The solution provided on the Internet is as follows:
1. This error occurs during struts running. The solution is to copy java_home/lib/tools. jar to atat_home/common/lib. (I DID NOT delete the
the El expression in JSP is invalid. check the servlet/jsp version used and view the web. if the following content exists at the beginning of XML, it indicates servlet 2.4/jsp 2.0.
xmlns = "http://java.sun.com/xml/ns/j2ee"
In struts, when a JSP operation assigns a value to a form attribute on the page, the page prompts ** form. ** property. the value is null or not an object, but the object is defined in form. Why is this happening? It is because you did not place the
Declare valid variables and methods in JSP programs
JSP syntax
Example
Description
Declare the variables and methods you will use in the JSP program. You must do the same. Otherwise, an error will occur.
You can declare multiple variables
1. log on firstWww.fckeditor.net/downloadTo download the latest FCKeditor version, you need to download two packages: one is the basic application and the other is the configuration prepared for the JSP.
FCKeditor 2.6:
I. garbled characters on the JSP page
2. garbled characters appear when the form is submitted to Chinese
Iii. Database Connection
During the JSP development process, Chinese garbled characters often occur, which may affect you. Now I have
Objects of the file class are mainly used to obtain information about the file itself, such as the directory where the file is located, the length of the file, and the read/write permissions of the file, and do not involve read/write operations on
Editor:"On-site documentary" is a new small section of the hacker attack and defense area. Here we will introduce you to some real cases of online hacker intrusion. Different from the previous cases from the perspective of website security personnel,
Garbled characters may occur when parameters are passed in the URL on the JSP page.
The solution is as follows:
1. Use the method to change tomcat. This method is simple, but it must be modified at the server software level. If the system is
(1) Introduction to built-in objects
JSP provides some internal objects to simplify page development. These internal objects do not need to be instantiated by JSP writers. They are implemented and managed by containers on all JSP pages.
Internal
255) FF = 255; If (CC> 255) cc = 255; int r = FF + random. nextint (CC-ff); int G = FF + random. nextint (CC-ff); int B = FF + random. nextint (CC-ff); return new color (R, G, B) ;}%>
Use JSP to read remote files and save them to a local device
Reading network files is somewhat different. I will give you a complete code and save it as JSP to run it directly.
//? PathString S1 = "http://www.google.co.jp ";// Local storage
Character encoding of JSP and Servlet in Tomcat Use filter to change the Request Encoding
In the previous article, we discussed the issue of JSP and Servlet character encoding under tomcat!
Knowing that when no request encoding is specified, the
Problem: we want to receive XML Information sent from JSP and store it in the DataGrid component.
Steps:
response. setcontenttype ("text/XML"); connection con = NULL; resultset rs = NULL; con = bean. getconnection (); string SQL =
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.