A. JSP directives are used to set the entire JSP page related propertiesDirectives can have many properties, which exist as key-value pairs and are separated by commas.Three types of directive tags in JSPs:page directiveThe page directive provides the container with instructions for using the current page. A JSP page can contain multiple page directives.Syntax fo
1. JSP directives:(1). page directive: Usually at the top of a JSP page, the same page can have multiple page directivesSyntax: Common Properties:Language: Specifies the scripting language used by the JSP page; default value: JavaImport: Use this property to refer to the class file used in the scripting
Obtains the bean property value, which is displayed on the page.
JSP syntax
Beaninstancename"Property ="Propertyname"/>
Example
Calendar
Description
The
You cannot use
You can use Bean.
Attribute
Name ="Beaninstancename"Bean name, specified by
Property ="Propertyname"Attribute name of the specified bean.
TIPS:
As mentioned in Sun's
JavaServer pages (JSP) is a java-based technology for creating dynamic Web pages that support Cross-platform and cross Web servers.
JSP is comparable to Microsoft's active Server Pages (ASP), but the JSP uses HTML-like markup and Java snippets rather than VBScript. When you use a Web server (such as Apache or Netscape server) that does not provide ASP local supp
initialization process, such as a connected database.Servlets are platform-independent. As mentioned earlier, the servlet is written in Java and naturally inherits the platform independence of Java.The servlet is extensible. Since the servlet is written in Java, it has all the advantages that Java can bring. Java is a robust, object-oriented programming language that can easily be scaled to suit your needs. The servlet naturally has these characteris
Servlet case 7: jsp technology and cases, servlet case 7 jsp
Jsp running principle:
Create a java file (servlet) based on the jsp file and compile and run it.
The first access will be translated into a servlet and then executed
Three jsp commands:
1. page command: configure
Objective: l further understand JSP applications; l understand the use of expression languages; l master the use of standard tag libraries; l master the use of org.apache.jasper.JasperException: /login.jsp(8,0) Invalid byte 1 of 1-byte UTF-8 sequence.You need to set the encoding method. Add the following statement on the page file: reference material: java Web programming basics tutorial
js| comparison |js Currently, the most commonly used three dynamic Web page languages are ASP (Active Server pages), JSP (JavaServer pages), PHP (hypertext preprocessor).
Introduction
ASP full Name Active Server Pages is a Web server-side development environment that enables the generation and execution of dynamic, interactive, high-performance Web Service applications. ASP uses scripting language VBScrip
Introduction to a JSP The full name of the JSP is Java Server Pages, the Chinese name is the Java Servers page, it is simply a simplified servlet design, it is by the sunMicrosystems company advocates, many companies involved in the establishment of a dynamic Web technology standards. JSP technology is a bit like ASP technology, it is in the traditionalWeb page H
3.2. Page directiveRole: Tell the Tomcat server how to translate the JSP fileLanguage= "Java"--tells the server what dynamic language to use to translate JSP filesImport= "Java.util.*"--Tell the server what package the Java file uses (import package),Separating multiple packages with commasPageencoding= "Utf-8"--Tell the server what encoding to use to translate
basic syntax
.动态注释 -->"); For (int I = 1; I ");} Out. println (str); %>
Browser access:3. Three jsp compilation commands
The jsp Compilation instruction is a message that notifies the jsp engine. It does not generate output directly, and the Compilation instruction has a default value. There are three common compilation commands:Page command: this command i
JSP page file consists of JSP elements and template data!The following is a simple JSP file program code:1 @ Page Language="Java"ContentType="text/html;2 CharSet=UTF-8"3 pageencoding="UTF-8"%>4 DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd ">5 HTML>6 Head>7 Metahttp-
not, execute the JSP Servlet that is already in the memory. In this way, the actual cost for the first call of a JSP page is much higher than that for later calls because it involves translation and compilation. To solve this problem, perform the following actions:
① Configure the application so that all JSP pages are called when the application starts, rather t
Contains a static or dynamic file.
JSP syntax
Relativeurl| Expression% >}" Flush = "true"/>
Or
Relativeurl| Expression% >}" Flush = "true">
Parametername"
Value = "{Parametervalue| Expression% >}"/> +
Example
Description
You cannot determine whether a file is dynamic or static from the file name, suchAspcn. asp
It may only contain some information and does not need to be
annotations cannot prevent JSP or Java code execution.
JSP Directive)Page commandInclude commandTaglib command
Syntax:
The page command defines the global attributes of JSP files. 1. The language can only be java2. After extends JSP is translated, the Servlet inherits the
JavaServer Pages (JSP) is a Java-oriented Cross-platform Web development language.
JSP is compatible with Microsoft's active Server Pages, but it uses HTML-like labels and Java program snippets rather than VBScript. When you are using a Web server that does not provide local ASP support, that is, Apache or Netscape server, you may consider using
I. JSP Technology Overview after Sun officially released JSP (JSP verpages), this new Web application development technology soon attracted people's attention. JSP provides a unique development environment for creating highly dynamic Web applications. According to Sun, JSP c
js| Comparison | dynamic
Currently, the three most popular dynamic page languages are ASP (Active Server pages), JSP (Java Server Pages), PHP (hypertext preprocessor).
Introduction
ASP full Name Active Server Pages is a Web server-side development environment that allows you to generate and run dynamic, interactive, high-performance Web Service applications. ASP uses the scripting language VB Script (Java s
This article will show you how to develop and deploy a simple Portlet-based JSP in IBM WebSphere Portal version 5.
IntroductionIn the first article of the "Hello World" sequence, you have learned how to create a Portlet in Java that can output "Hello, world ". This is exemplary and not a practical method for developing a Portlet. So what is the problem with it? This article (the second article) will solve one of the problems in the future.
In this si
of the name range name of the implicit object in JSP
PageContext page javax. servlet. jsp. PageContextRequest javax. servlet. ServletRequestSession javax. servlet. http. HttpSessionApplication javax. servlet. ServletContext (if used, it must be processed synchronously)
Ii. EL expression
It is only an expression in JSP, not a development
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.