Author: Xu Chunqin
JSP default is multithreaded, this is the JSP and Asp,php,perl script language is not the same place, but also one of its advantages, but if you do not pay attention to the synchronization problem in multiple threads, will make
The rapid development of Java Server Pages (JSP) from the server-side facilitation program has made it a popular tool. Although the inflexible side still exists, however many drawbacks it contains, JSP can provide a lot of things for web programmers,
Is your Java application running very slowly? Can they afford to keep up with the rising traffic? This article describes the development of high-performance, highly resilient JSP pages and the performance optimization of the servlet technology. The
JSP to go through the "code" two times, the first phase will use Pageencoding, the second phase will be used Utf-8 to Utf-8, the third stage is from Tomcat out of the Web page, with the ContentType.About the differences between the pageencoding and
The servlet has a very interesting and useful function, that is, filter. The so-called filter is a small program that executes before a user requests to the servlet, or after the servlet executes, to preprocess a user request, or to do some public
1, the MySQL limit keyword (DAO)
SELECT * FROM tablename limit startpoint, numberperpage;
TableName is the name of the table to be paged;
StartPoint is the starting position-1;
Numberperpage is the number of bars displayed on a page.
For
In projects, we often encounter the need to pass Chinese characters in JSP page transitions. There are two main ways of doing this.
Url method
For example:
Http://website/test1.jsp?act=add&type= Apple ¶m=%20d%20b
Form mode
For example:
1. Requestdispatcher.forward ()On the server side, when using forward (), the Servlet engine passes HTTP requests from the current servlet or JSP to another servlet, JSP, or normal HTML file, or your form to a.jsp, The forward () redirect to b.jsp
Looking for a long time finally found a JSP can be used ... Share!!
Copy Code code as follows:
pageencoding= "UTF-8"%>
"
Management Area
cellspacing= "1" class= "Table_style" >
Product Picture:
1. Join in the XMLHTTP request with no refresh request
var Http_request=false;
function createrequest (URL)
{
Http_request = false;
if (window. XMLHttpRequest) {//Mozilla, Safari,...
Http_request = new XMLHttpRequest ();
if
1. Requestdispatcher.forward () is on the server side, when using forward (), the Servlet engine passes HTTP requests from the current servlet or JSP to another servlet,jsp or normal HTML file, or your form commits to a.jsp, The forward () redirect
Data save, update, and delete:
1, Session.save () method:
The Session.save () method is used for persistent storage of entity objects, which means that when the Session.save () method is executed, the corresponding insert SQL statement is generated,
JavaScript has developed so far, has tended to mature, for JavaScript, a program, must not only contain output operations, but also need to define variables, its application compared to Java is very simple and reasonable.
Defining variables in
First, install the software
You need to install the following software on your computer:
NetBeans IDE 4.1Java Standard Development Kit (JDKTM) 1.4.2 version or version 5.0
Second, the Web server
NetBeans IDE 4.1 bundled with Tomcat
Third,
Create cookies with JSP
What is a cookie?
As you know, the browser communicates with the Web server using the HTTP protocol, and when a user makes a page request, the WEB server simply responds, and then closes the connection to the user. So when
1. Requestdispatcher.forward ()
is on the server side, when using forward (), the Servlet engine passes HTTP requests from the current servlet or JSP to another servlet,jsp or normal HTML file, or your form commits to a.jsp, The forward () redirect
Absolute path and relative path problems in JSP and servlet I've been bothering you for days, and after trying to share some of the experience with you.
Premise: Suppose your HTTP address is HTTP://192.168.0.1/your Web application is WebApp, then
About the differences between the pageencoding and ContentType two properties in a JSP page:
Pageencoding is the encoding of the JSP file itself
ContentType CharSet refers to the content encoding of the server when it is sent to the client
JSP to
1. When using the println () method for objects of type string, if the object is null, it will print null instead of raising the NullPointerException, which is an easy illusion, and can cause problems for subsequent operations on the string.
2. The
For and Response.sendredirect () These two jumps, the confidence everybody certainly will not be unfamiliar, belong to jump of an instruction, Response.sendredirect () is a jump method in the response object, more specifically, a turn. But in any
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