The following is the use of Tomcat as a JSP engine, with Tomcat, Apache, IIS three kinds of Web servers to tell the 3 kinds of building JSP operating environment scenarios.
Introduction of related Software
1, J2SDK:JAVA2 software development tools,
A, JSP El language definition E L (Expression Language) Purpose: to makeJSP is simpler to write. Expression languages are inspired by the ECMAScript and XPath expression languages, which provide a way to simplify expressions in a JSP. It is
Method One: Caching data in the Init () method of the Servlet
After the application server initializes the servlet instance, it invokes the Init () method of the servlet before servicing the client request. In the lifecycle of a servlet, the init ()
js| notes
Some netizens do not know how to run their own JSP files, I briefly introduce here, to provide you with a point of reference:
1. Download and install Tomcat. Download Address: Http://jakarta.apache.org/tomcat
2. Write your own JSP Web
javascript|js| Dynamic General, we use
Request.getparameter ("value");
To get the value of the static HTML input. Then don't forget to judge whether it is empty, whether it contains special characters, etc.
can also use
Enumeration
JS instruction Element (directives Elements)
Instructions are mainly used to provide information about the entire JSP page, and to set the relevant properties of JSP pages.
One, page instruction
Function: Set the properties of the entire JSP Web
Js
Primenumbers.java
Note that the servlet uses the Servletutilities.java given earlier. Also used: Primelist.java, to create a vector;primes.java of prime numbers in a background thread, to randomly generate large digits of BigInteger type, to
js| convert public static string Escapehtmltags (string input) {
Check if the string is null or zero length-if so, return what being sent in.
if (input = = NULL | | input.length () = 0) {
return input;
}
Use a stringbuffer in lieu of String
JSP anti-theft Chain
index.jsp
The following are the referenced contents:-----------------------------simple JSP pageplace your content hereThis is index JSPGet Header Infoa.jsp------------------------------
a.jsp page
By
js| Paging
When we query the database, if the query out of the result is a lot of, such as 1000, then, if all of the display to a page is simply intolerable things! So we want to page out, each page shows 10 or 20 rows, the purpose of paging is so
js| Program | news | web | chinese | Garbled in JSP, Chinese garbled often makes people utterly confused.
For
The common countermeasures of Chinese processing, often visible on the Internet are mainly the following 2 kinds:
Contenttype= "text/html;
Common Classification Information home page, need to read at least six times database, other subpages, five to more than 10 times.
With database connection pooling, Tomcat can support a very limited amount of concurrency. system resources are
JSP programs are modules, and have a powerful expression-request (presentation-request) function. Creating a perfect database access is a challenging process, and the JDBC interface is a good way to do this. However, the JDBC code embedded in the
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,
Some time ago to do their own community forum, on the basis of Jive to do a page to show all the forum posts, can be called the general version, imitate the Forum class interface to do a superforum and realize cachable, but because this page refresh
In a word, cookies should be a technology that has been used for a long time. As early as the HTML appeared, there was no way to record and identify different users between each individual page. Later, people invented the cookie technology, when the
This article only discusses how to install apache+servlet+jsp on Windows NT 4.0. The configuration in this article is as follows:
Windows NT 4.0
Jdk1_2_2-001-win.exe
Apache_1_3_12_win32.exe
ApacheModuleJServ.dll
Tomcat.zip (3.0)
A. Software
File operation is one of the important content of Web programming, ASP on file operation has been discussed a lot, let's see how JSP is implemented.
Here to use two files, a JSP file, a JavaBean file, through the JSP call JavaBean can easily append
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
Servlet and JSP Technology is the Java Development Server-side application of the main technology, is the development of business applications, the standard of the presentation end. Java developers like to use it for a variety of reasons, one is
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