Page: The current pages, that is, as long as the other pages are not valid, can be approximated to understand the Java this objectRequest: A session, a simple understanding is the scope of a request is valid, for example, if the forward way to jump,
One: Page Property scope"java"import="java.util.*" pageencoding="UTF-8"%>"C"uri="Http://java.sun.com/jsp/jstl/core" %>my JSP ' jspobj.jsp ' starting pagepage Range of Properties These properties can only be useful on the current JSP
Made a system. The user_add.jsp page and the user_list.jsp page are displayed.
Add the chinese user name "I love you" and the password "123"
Garbled characters are displayed on the display page. An error occurred while displaying Chinese
Data modification of the view, also modified in the tableReference tool class with "java.util.Date" %>" Java.text.SimpleDateFormat" %>The introduction package can be written in a single piece, or it can be separated by commas in a single line.""
Summary:
This paper first introduces a JSP's source file execution process, that is, after three stages, two times coding, to complete a complete output. It is particularly noteworthy that in this process, the coding problem runs throughout. We know
First, the JSP tag introductionJSP tags, also known as JSP Action (JSP actions) element, it is used to provide business logic function in JSP page, avoid writing Java code directly in JSP page, which makes JSP page difficult to maintain.Second, JSP
The following JSP program dynamically generates a testDynamicInclude. inc. jsp file and calls it later.
In the dynamic generation of JSP, pay attention to the path in it. "." Represents the root directory of your project.
If your JSP file is under
I. Quoting JSTL1, the introduction of JSTL can make JSP code in and other code disappears, and then combined with El expression, will be more convenient and beautiful.2, each set of framework (not learning, such as STRUTS,SPRINGMVC, etc.) have
1 PrefaceJava developers probably know that there are two ways to introduce other files in a JSP into a project. We may use both of these methods, but perhaps many people do not name the difference between the two ways. Let's take a look at the
1, first of all, briefly talk about the development of the regular Web login module (for simple login function, the database fields are not encrypted and encrypted during transmission)
Non-Secure Login module development
Using Jsp+mysql
The database
1. What is JSP?
LJSP-To put it simply, Java code is embedded in HTML, which consists of static HTML, dedicated JSP tags, and Java code.-Server-side technology. Automatically converted to servlet in the background-Only when the modified
First, let's talk about the functions of several encodings in JSP and Servlet.
In JSP and Servlet mainly have the following areas can be set encoding, pageEncoding = "UTF-8", contentType = "text/html; charset = UTF-8", request. setCharacterEncoding (
JSP three major instructionsA JSP page can have 0-n instructions1.page---> Most complex: *pageencoding and ContentTypePageencoding: Specify the current JSP page encoding, as long as not to lie, there will be no garbled! You need to use pageencoding
First, let's talk about the functions of several encodings in JSP/servlet.
In JSP/servlet mainly has the following areas can be set encoding, pageencoding = "UTF-8", contenttype = "text/html; charset = UTF-8", request. setcharacterencoding ("UTF-8"
First, let's talk about the functions of several encodings in JSP/servlet.
In JSP/servlet mainly has the following areas can be set encoding, pageencoding = "UTF-8", contenttype = "text/html; charset = UTF-8", request. setcharacterencoding ("UTF-8")
Briefly summarize:
Method= "Get",
String Output=new string (name.getbytes ("iso-8859-1"), "UTF-8");
%>
Method= "Post",
String name=request.getparameter ("name");
Here's how it works:
First, talk about the role of several encodings in Jsp/servlet.
login.jsp"Java"Contenttype="text/html; Charset=utf-8"pageencoding="UTF-8"%>"-//w3c//dtd HTML 4.01 transitional//en" "HTTP://WWW.W3.ORG/TR/HTML4/LOOSE.DTD">"Content-type"Content="text/html; Charset=utf-8">insert title
First, IntroductionC # defines the ADO interface to enable access to databases such as SQL Server, Oracel, and Java, which defines the JDBC interface for database access, and the Java language can access the database as long as the database provider
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.