Taglib applications in JS JSP (2)
2. Start
Now let's take a closer look at the application of XML in JSP.
First you need to define the TLD file and the corresponding tag processing Java class file. Then use tag in the JSP through the defined
JS Custom Label Insider
A simple custom tag consists of the following elements:
JavaBean: In order to take full advantage of the object-oriented nature of Java, reusing code should be placed in a separate code container. These javabean are not
JS Author: Casey Kochmer/Translator: Liao
Date: February 27, 2001
The author uses JSP and ASP to engage in programming work for a long time, I increasingly feel that in these two server-side programming solutions, JSP functions more powerful
js| variables in are local to the JSP, and they are not visible to external functions, even if they are declared on the same page. Such as:
int evilvariable = "666";
%>
...
function TestFunction () {
Inside the function, the variable evilvariable
js| syntax expressions
Contains an expression that conforms to the JSP syntax
JSP syntax
Example
.
Describe
An expression element represents an expression that is defined in a scripting language, automatically converted to a string
js| Syntax Hide annotations
Write in the JSP program, but not to the customer.
JSP syntax
Example:
a Comment test
a Test of Comments
Describe
Characters marked with hidden annotations are ignored when the JSP is compiled. This
JS JSP Other Related resources:
Servlets and JavaServer Pages (JSP) 1.0:a Tutorial
http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/
JavaServer pagestm:a Developer ' s
Java object |js A lot of people will ask, JSP in the session object how to use Ah, what the problem, in my opinion, this is not a problem, because the Servlet API is described in detail. This table lists the internal objects in the JSP and their
Js| News
Have you ever wanted to send a dynamically generated image from a JSP page (or servlet)? This tip tells you how to do it. To run the code here, you need a tomcat or other Web server that supports JSP 1.1.
When a MIME type of a Web page
js| Dynamic Four, the unified website interface
JSP supports server-side file inclusion, that is, you can insert multiple other files in a JSP file to achieve a unified web interface. Modify the above hi.jsp and save as mypage.jsp:
String MSG =
js| Program | Programmer one: description \ r
In this article use proficient, skilled, familiar, understand the symbol of your mastery of a technology.
Proficient: Be able to master this technology 85% technical points above, use this technology for
JS Install JSP's operating environment
A lot of users want to learn JSP by JSP installation environment, I do not know what kind of software to run JSP, or know the required software name but in the process of installation is always a problem. I'm
js| syntax
HTML annotation
Displays a comment on the client.
JSP syntax
]-->
Example 1
Generate the same data as above in the client's HTML source code:
Example 2
-->
Displayed in the client's HTML source code as:
js| Syntax Declaration
Declaring legitimate variables and methods in a JSP program
JSP syntax
Example
Describe
Declare the variables and methods that you will use in your JSP program. You must do the same, or you will make
JS Author: Blueski compilation
The text file can be written using the PrintWriter object.
Please refer to the following example:
String str = "Print Me";
Always give the path from root. This is way it almost always works.
String
Js|servlet The following code fragment demonstrates a servlet that illustrates (instantiates) a bean and initializes it with the form data sent by the browser. The bean is then added to the request, which is sent to the JSP page (bean1.jsp), which
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.