attribute can be absolute or relative URL. The URL points to the tag library Descriptor (TLD) file;B. The URI attribute can also be a non-existent URL, which is a ing of the absolute URL of the library Descriptor (TLD) file to the local system in the web. xml file;3) Example:
5. Make tag library execution availableA: Method 1: deploy the tag handler class under the WEB-INF/classes directory;Method 2: Pack
The development of a tag library in a JSP requires only the following steps1. Development of custom Label processing classes2, create a *.tld file, each *.tld file corresponding to a tag library, each tag library can contain multiple tags3. Using a custom label in a JSP fileDeveloping Custom Label ClassesWhen a simple tag is used on a JSP page, the underlying is actually supported by the label processing cl
directives in the tag file
Tag file and JSP are very similar, there are different, the main difference in directives. JSP's directive has include,taglib and page, but tag has include and taglib, no page, and also provides Tag,tag replaces page in JSP, and provides
The Tag directive has the following properties, which are optional: pageencoding : The meaning in the same page that defines the encoding of the tag output. iselignored : The same meaning on the page requires that the EL expressi
OverviewThe builder pattern is a more complex creation pattern that separates the client from the creation of complex objects that contain multiple components (or parts), and the client does not need to know the internal components and assembly methods of complex objects, only the type of builder required. It is concerned with how to create a complex object step by step, different concrete builders define different creation processes, and the concrete
builders) void Setplaypattern ( Playpattern * pplaypattern);//package construction process, call hook method, determine whether the corresponding components need to build player * Construct ();}; #endifThe Storm video player Commander Class CPP file is implemented as follows: #include " ContructManage.h "//design Player mode (that is, set concrete builder) void Contructmanage::setplaypattern (Playpattern * pplaypattern) {m_ Pplaypattern = Pplaypatter
:**************************************** **************************************** *****1. To enable the JSP Container to use the custom behavior in the tag library, the following two conditions must be met:1. Identify the tag representing this custom row from a specified tag Library2. Find the specific class to implement the custom Behavior
The first required condition-Identify the tag library that a custom behavior belongs to-is completed by the taglib directive's prefix attribute of the tag c
= GetCoordLstFromString (geostr); // parse the Json string to obtain the coordinates of all vertices (here the subfunction is omitted)
22. double xmin = 181, xmax =-181, ymin = 91, ymax =-91; // Four boundary values. Because the layer is longitude and latitude, the initial values are set to these values.
23. // calculate the maximum and minimum values
24. for (int k = 0; k 25 .{
26. if (k % 2 = 0)
27 .{
28. if (coords [k] 29. if (coords [k]> xmax) xmax = coords [k];
implement these custom rows.
The first required condition-Identify the tag library that a custom behavior belongs to-is completed by the Taglib Directive's Prefix attribute of the tag command, therefore, all elements with the same prefix on the same page belong to this tag library. Each tag library defines a default prefix, which is used to insert custom tags in the document or page of the tag library. Therefore, you can use prefixes such as jsp, jspx, java, servlet, sun, and sunw (they are all
specified tag Library
2. Find the specific class to implement the custom Behavior
The first required condition-Identify the tag library that a custom behavior belongs to-is completed by the Taglib Directive's Prefix attribute of the tag command, therefore, all elements with the same prefix on the same page belong to this tag library. Each tag library defines a default prefix, which is used to insert custom tags in the document or page of the tag library. Therefore, you can use prefixes such as
tagPrefixt ---- namespace prefix
When referencing jstl, META-INF/c. tld in importing jstl. jar
What are the nine built-in objects of JSP?What is a built-in object? When JSP is translated into Servlet Code, some objects have been created by default. Such objects can be directly used in jsp, and built-in objects
Page, request, session, application, response, pageContext, out, config, exceptionRequest HttpServletRequest ---- request objectResponseHttpSe
attack that could be achieved by using script insertion.Vulnerabilities are called XSS, and there is another attack method: "Script Injection". Their differences are as follows:1. (Script Injection) the Script insertion attack will save the Script we inserted in the modified remote WEB page, as shown in figure: SQL injection, XPath injection.2. Cross-Site Scripting is temporary and disappears after execution.What types of scripts can be inserted into remote pages?
Mainstream scripts include the
Personal Understanding:
The construction of a complex object is separated from its representation, allowing the same build process to create different representations.
After searching for a number of builder models, I found that some of the builders ' goals were to encapsulate the product in different order, some of the same order of different products, the order was encapsulated in the director, and some were not encapsulated, but deferred to the
-elements: Defines the URI of the TLD file, which can be obtained by using the taglib instruction in the JSP Web page Specify where the TLD file is stored relative to the Web site Like what: 12 Mytaglib3/web-inf/tlds/mytaglib.tld4Defines the resources available to the platform using Jndi, with five child elements: Resource Description Resource Name Types of resources Resources are licensed through applicati
remote WEB page, such as SQL injection and XPath injection.
2. Cross-Site Scripting is a temporary attack, which disappears from the page after being executed.
Common web pages that can be inserted with scripts include:
HTMLJavaScript (discussed in this article)VBScriptActiveXFlash
Analysis on XSS vulnerabilities
When many cgi/php scripts are executed, if it finds that the request page submitted by the customer does not exist or there are other types of errors, the error message is sent to the
There is a mechanism in JSP that allows you to insert a tag similar to HTML in the JSP page. This article introduces the basic concepts and components of JSP custom tag, and how to develop and apply JSP custom tag.
What is tagUsing the HTML language, We can edit our webpage as follows:
HELLO WORLD
HELLO WORLD
Here we call
In the preceding example,
Process of parsing tags on JSP serversAfter a tag is embedded into a JSP page, how does the JSP server parse the tag? The meaning
down for the specified robot number = 0, robot type = TLD and density = hcart03/11/2008 18:23:59 backupcenter240-No drives up on storage unit 03/11/2008 18:24:00 bjdb01-All Drives are down for the specified robot number = 0, robot type = TLD and density = hcart03/11/2008 18:24:00 backupcenter240-No drives up on storage unit 03/11/2008 18:24:31 backupcenter240-All Drives are down for the specified robot num
Document directory
1. attributes need to be added to the original hellotag. java.
2. Add the attribute description to the TLD file:
I. Introduce tags
In fact, we have used several tags in JSP, such as
The advantage of tag programming is flexibility + encapsulation.
Flexibility is embodied in attribute assignment and can be assigned any value. For example,
Encapsulation is embodied in the encapsulation of internal behavior. Because labels are imp
Taglib
Tags are defined and distributed in a structure called the tag library. A tag library is a set of metadata and classes:1. Tag Processor: Java class that implements the custom tag function.2. Tag additional information (TEI): provides edge information to JSP containers to confirm tag attributes and create variable classes.3. Tag library Descriptor (TLD): an XML document that describes a single tag and the attributes of the entire tag library.
Th
1035.
//
// Most common applications, including email and the Web, will generally not permit... escaped strings
// (Http://tools.ietf.org/html/rfc3696#section-2)
//
// Characters outside the set of alphabetic characters, digits, and hyphen must not appear in domain name
// Labels for SMTP clients or servers
// (Http://tools.ietf.org/html/rfc5321#section-4.1.2)
//
// RFC5321 precludes the use of a trailing dot in a domain name for SMTP purposes
/
from a specified tag library
2. Find specific classes to implement these custom behaviors
The first requirement-find a custom behavior that belongs to that tag library-is done by the prefix of the label directive (Taglib directive ' s Prefix), so elements that use the same prefix on the same page belong to this tag library. Each tag library defines a default prefix that is used in a document in a tag library or in a page to insert a custom label. So, you can use prefixes other than those such
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.