1 defining headers and root elementsThe deployment descriptor file, like all XML files, must start with an XML header. This header declares the XML version that can be used and gives the character encoding of the file.The DOCYTPE declaration must
Assuming that the current client's IP address is output to the browser, we can now writeBut we now want to minimize Java code on the JSP page, this time we can learn the tag as before, we define a tag, by calling the tag to achieve the display
1.1.1 Custom El function (El call Java function)First step: Create a Java class. The method must be a static method .public static string SayHello (string name) {Return "Hello" + name;}Step two: Provide a TLD file. (TLD file Tag library file.)
1. Introduction to jstlJSP standard tag Library (jstl) is a web application.ProgramCustom tag library set for common features, including iteration and condition judgment, data management formatting, XML operations, and database access.Jstl 1.0 has
Custom tag Library development with El expressionCustom tag Library development with El expression1. Development of Custom tag librariesCustom tag libraries are primarily used to remove Java code from JSP pages.Step One:Write a class that implements
let the page call this tag is not struts2, but the system of their own copy. Label with the same name as the package. A direct click will enter the corresponding TLD file. or how to find the TLD file from inside the jar package. finding TLD
If we need to make a domain name query for the age of the script can use the following script.
Class domainage{Private $WHOIS _servers=array ("com" = = Array ("whois.verisign-grs.com", "/creation Date: (. *)/" ), "net" = = Array
Document directory
Common configurations:
Struts is an open-source framework developed by the Jakarta project team of Apache and an implementation of the MVC design pattern.
Struts2.x is based on webwork, so struts1.x and struts2.x are very
Reprinted from http://www.javaeye.com/topic/172186
Author thblovezhj
OscacheIs currently the most widely used cache solution, JBoss, hibernate, springAnd so on,The following is a brief introduction to Oscache.Configuration and use process.
1.
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
A java code cannot appear because of jsp code specifications. All have the jsp custom tag technology.
Therefore, jsp's custom tag technology is to remove the java code in jsp. At the same time, encapsulation of the tag's personal feeling is also a
Jsp tag & EL expression, jsp tag Library
1. jsp tag and el expression(1) What is a jsp tag?The jsp tag is used to replace the java code in the jsp file. After the container encounters a jsp tag, it finds the tag Class Based on the tag and then
Each station's WEB-INF has a web. xml setting file, which provides the configuration settings of our platform.
Web. XML definition:. Platform Name and description. Initialize environment parameters (context). Servlet name and ing. Session settings.
In Java, we can directly write string STR = str1 + str2 in this way. In JSP, if the El expression is used, ${1 + 2} returns 3, $ {'xxx' + 'xxx'} is incorrect, because El calculates it and throws an exception in Java. lang. numberformatexception: for
1. Import jstl
Method 1:
Right-click your project and select the Add jstl library option in myeclipse.
Method 2:
Create a project. In the "jstl support" column, add jstl libraries to web_inf/lib folder and click Finish.
Ii. Use jstl
1. Introduction
Reprinted: Reprinted please keep this information, this article from http://www.matrix.org.cn/resource/article/0/701.html
Author: Vikram Goyal 11/20/2002
Original article: http://www.onjava.com/pub/a/onjava/2002/11/20/templatestruts.html
Translator:
The following steps are required to develop a tag library in JSP2:1. Development of custom label processing classes;2. Create a *.tld file, each *.tld file corresponding to a tag library, each tag library can contain multiple tags;3. Use a custom
I. El OverviewEL (Expression Language): The purpose is to make the JSP easier to write.1.1, the role of ElAfter JSP2.0 the HTML and CSS, to separate the HTML and JS, the Java script to replace the label. Does not include , etc.and the benefits of
Introduction to Custom Labels
Custom labels because there is no practice, so the master is not very deep, but for me enough to meet the user login registration case and shopping cart case, have time or more understanding of the good
1.
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.