I,
Declaration Used for definition
Expression (exception) is used to display the returned value or variable value: outputs the operation result to the screen using the value of the variable or method, any form of variables can be used between
When Using JSP for web projects, we may encounter problems that cannot be displayed in Chinese.In servlet, request. setcharacterencoding ("gb2312"); (the request is an object of httpservletrequest) is used for processing.Every servlet is very
The error is as follows:
:
It can be seen that I want to upload a numbered value of 0515, but the value is 333 when it is passed to the function, resulting in an error.
After careful checkCodeBasically correct
Cause: Because the string
Now, you can indicate Server The verification method used. "Amazing," you said. "unless I can specify a URL to be protected, it will be of little use ." Yes. It is the purpose of the security-constriaint element to identify these URLs and indicate
A tag is used to iterate the content inside the tag. It can be a fixed number of iterations, or the number of iterations can be determined based on the number of objects in the set. body content
A tag has the following attributes:
L var: name of
JSP is executed in multiple threads by default. This is different from ASP, PHP, Perl, and other scripting languages. It is also one of its advantages. However, if you do not pay attention to the synchronization problem in multiple threads, this
1. the scope is public, private, and protected.
A: The differences are as follows:
Scope: current class, same package, Child class, other package
Public √
Protected √ ×
Friendly √ ××
Private √ ×××
The default value is friendly when no data is
1. How to execute a thread-safe JSP?
A: You only need to add the following command:
2. What is the difference between collection and collections?
A: collection is an interface under java. util. It is the parent interface of various collection
Document directory
1. filter class:
2. Web. xml file:
Solution:
Set a filter in the background to filter and convert the encoding!
The procedure is as follows:
1. filter class:
Public class loggerfilter implements filter {Private string
/*Drop table imagetable;Create Table imagetable(NID int not null,Image blob,Primary Key (NID))Type = InnoDB;
*/
/*// ========================= 1. Write the file to the large field of the database and begin in ============ ==============Class.
By chance, I saw a website with fresh and comfortable pages. The website is developed using JSP,
Because of my personal interests, I decided to look at the security of the system.Telnet www.target.com 8080GET/maid HTTP/1.1[Enter][Enter]The returned
When I first learned JSP, I encountered this problem. I didn't package classes when I was writing beans, that is, I didn't use the package statement. Bean compilation was correct, put the compiled class file under the WEB-INF/classes directory, then
Type 1: struts1.2 looping element. name indicates the result set. Reference tag library [Java]$ {X. u_id} $ {X. u_name} $ {X. u_sex} modify Delete
Type 2: struts2.0 looping element. Note: value is the result set. Reference the tag library
Several methods to prevent users from directly accessing JSP pages:
1. Put the JSP page under the WEB-INF directory, store everything in this directory or its subdirectory is protected.
However, it is not recommended because not all containers have
Several Methods for passing JSP page values:1. Hide the field transfer value:">
2. url transfer value:Use buttonA. '"Value = "Modify distributor"/>B. Set the onclick = "modifyregion ()" of input ()"Function modifyregion (){Window. Self. Location =
1. requestdispatcher. Forward ()
Is used on the server. When forward () is used, the servlet engine transmits the HTTP request from the current servlet or JSP to another servlet, JSP or common HTML file, that is, your form is submitted to. JSP, in.
A bar chart program was written at the company's request some time ago, but the content was obtained from another analysis software. The software can save the content generation table to the TXT file, I had to read the data by reading the file.
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.