JSP three major instructions----------------------------------------------A JSP page, you can have a definition of 0~n instructions!1. Page-and most complex: format: * Pageencoding and ContentType:> pageencoding: It specifies the current JSP page encoding, as long as not to lie, there will be no garbled! You need to use pageencoding! when the server wants to comp
JSP compiler directives are information that notifies the JSP engine that it does not generate output directly. There are three common compiler directives:Page directiveThis directive is a descriptive instruction for the entire JSP page. The syntax format is as follows:The% @page[language= "Java"][extends= "Package.class"][import=] Package. Class|package. *},..."
Learning Points of knowledgeJSP, which will eventually become a servletThe JSP eventually becomes a complete servlet that runs in the Web application, except that the Servlet class is written by the container.The Scriptlet in JSPThe so-called Scriptlet is the Java code placed in the
out.println(com.inspur.Counter.getCount());
%>
Directives in the JSPThe difference between JSP
Pass the JSP page value, and pass the jsp page
Parameters passing between JSP pages is a feature that is frequently used. Sometimes, parameters passing between multiple JSP pages are required. The following describes the implementation methods.
(1) Add
For example,
When using response. sendRedirect for page redirectio
Share JSP Chinese garbled code solutions and jsp garbled code
I. garbled Chinese characters on JSP pages
On the JSP page, there are two types of Chinese garbled characters: Chinese garbled characters in HTML and Chinese garbled characters dynamically output in JSP.
First loo
JSP tag, jsp tag Library1. although we want JSP pages to be used only as data display modules and do not nest any java code to introduce any business logic, it is impossible to introduce no business logic in actual development, but the introduction of business logic will lead to ugly java code on the page. How can this problem be solved?Sun allows users to develo
JSP custom tag simple getting started tutorial, jsp custom getting started tutorial
The following is the official sun document.
Official Document statement
public interface SimpleTagextends JspTagInterface for defining Simple Tag Handlers.Simple Tag Handlers differ from Classic Tag Handlers in that instead of supporting doStartTag() and doEndTag(), the SimpleTag interface provides a simple doTag() method, w
JSP/Servlet ----- differences between charset and pageEncoding, and between jsp and servlet
I. Functions of several encodings in JSP/ServletIn JSP/Servlet, encoding can be set in four places (as shown below). The first two can only be used in JSP, and the last two can be use
(1) instruction element: used to send a message from the JSP to the container, such as setting global variables, text encoding, introducing packets, etc.1. PageCommon properties in the page directive:
Language: Defines the scripting language to use, currently only "Java", that is, language= "Java".
Import: The same as the General Java import meaning, used to introduce the class to use, just a comma "," separate the package or class list. Omit
1. Design Ideas
Use the jsp http server to explain the local JSP source file and generate the intermediate java source file. Then, the javac compilation tool is called to compile the java source file into a class file. The jsp http server loads and runs the classes defined in the class file.
2. Key Points of Design
1) JSP
Five jump methods for JSP pages and five jump methods for jsp pages
Five redirect methods for JSP pages1. 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,
What is a session?
Session represents a client-to-server conversation
The session in the Web refers to the amount of time that a user has spent browsing a website, from entering the site to the browser closing, that is, the time it takes for the user to browse the site.
As you can see from the above definition, the session is actually a specific time concept
The session of different users is stored inside the server
Session Object
The session object is a
First, JSP actionActions are special tokens that enable the implementation of multiple lines of Java code through an action tag. Ability to insert files dynamically, Reuse JavaBean components, guide and have a page, and more.Unlike the action element and the instruction element, the action element is run dynamically at the client request and may be run once per client request, while the instruction element is compiled and run at compile time, and it i
First, JSP actionActions are special tokens that enable the implementation of multiple lines of Java code through an action tag. Ability to insert files dynamically, Reuse JavaBean components, guide and have a page, and more.Unlike the action element and the instruction element, the action element is run dynamically at the client request and may be run once per client request, while the instruction element is compiled and run at compile time, and it i
First, JSP actionActions are special tokens that enable the implementation of multiple lines of Java code through an action tag. Ability to insert files dynamically, Reuse JavaBean components, guide and have a page, and more.Unlike the action element and the instruction element, the action element is run dynamically at the client request and may be run once per client request, while the instruction element is compiled and run at compile time, and it i
JSP actions use you can dynamically insert a file, reuse the JavaBeans component, advance to another page, or generate an HTML for the Java plug-in. The action you can use is:
(1) Jsp:include--Included in a file when the page is requested.
(2) jsp:usebean--Find or instantiate a JavaBean.
(3) jsp:setproperty--sets a JavaBean property.
(4) jsp:getproperty--inserts the JavaBean attribute into the output.
(5) jsp:forward--allows the requester to move for
JSP Learning (JavaBean), jsp learning javabean
Java Web LearningI,
Build a java web development environment:
(1) install jdk
(2) install the Tomcat server (open source project of Apache), install Tomcat, and set Environment Variables
(3) install EclipseEE (or MyEclipse)II,
Introduction to WEB-INF Security directories (accessible only to servers)
(1) web. xml file (project deployment file ):
When we start a
1. JSPJSP (Javaserverpage) would is supplementary for servlets, rather than be substituted. Because the JSP sloves tow problems of Servlet.such as,first,the HTML tags in servlets all must being enclosed by Java String, Thus,make send HTTP Response become a process complicatedly; Second,all texthtml tags must hard-compiling,so even if revise merely for Presentation Layer,we must re-compile the A Pplication.2. JSP
JSP program running principle, document structure and simple input/output instance analysis, jsp instance analysis
This document describes the JSP program running principle, document structure, and simple input and output. Share it with you for your reference. The details are as follows:
Objectives:
Master the document structure of Web applications;Master the run
JSP basic syntax and JSP basic syntaxBasic JSP Syntax 1. JAVA code 2 on the JSP page, instructions 3 on the JSP page, and implicit objects on the JSP page (nine built-in objects)Directory 1. JAVA code on the
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.