If you want to test your JSP Application
Program Performance, then you can use jmeter, which is open by the Apache Software Foundation.
Source code . Jmeter allows you to develop test solutions to test accessible HTTP, FTP, and JDBC database
Drop-down list select Dynamic initialization (JSP page)
HtmlCode:
smart fuzzy search only search for content only search for titles & nbsp;
JS script:
Function _ select (O, v ){For (VAR I = 0; I If (O. Options [I]. value = V ){O.
1. First, let's see how to get the current time and display the Code:
------------------------------------------------
Java. Text. simpledateformat formatter = newjava. Text. simpledateformat ("yyyy-mm-dd hh: mm: SS ");
Java. util. Date currenttime
1. Request object
The request information of the client is encapsulated in the request object, so that the client can understand the customer's requirements and then respond. It is an instance of the httpservletrequest class.
Serial number method
JSP built-in objectDefinition: member variables that can be used in JSP page scripts (Java program slices and Java expressions) without declarationJSP has the following nine basic built-in components (corresponding to the six internal components of
To query a database on the JSP page, you can connect to and query the Java code section of the database and the HTML page code section. This page is implemented in three steps
1. Write the database connection code.
2. Write the code used to display
4. Compile tags with tags
To return tagsupport. eval_body_include, you can enter the label body;
Attributetag. Java
package org.tagext;import javax.servlet.jsp.tagext.*;import javax.servlet.jsp.*;public class AttributeTag extends TagSupport{private
The combination of JavaBeans and JavaServer Pages
Through the above learning, we should have a basic understanding of JavaBean. For calling JavaBeans in the assumerver pages, we also need to know some specific JSP content. Let's take a
Keyword: label C: Choose label used to select the execution statement
When the result of C: When test is true, the content in the label is executed;
If all C: When test results are false, execute the content in C: otherwise;
The format is as
obtain system time
Today is: Int year = calendar. Get (calendar. year );
Int month = calendar. Get (calendar. month) + 1;
Int day = calendar. Get (calendar. date );
String date = year + "year" + month + "month" + day + "day ";
Out. println
I. Preface
JDK (Java Development Kit) is the basis of all Java applications. It can be said that all Java applications are built on this. It is a set of APIS, or Java class. The latest version jdk1.3 has been officially released. Considering that I
In a web application, you cannot access the local file de. You can move the file to be referenced to the project and obtain it through the relative path. Sometimes we need to access the local file, so we can pass in the form of a stream. For example:
The process of developing and using JSP custom tags:
1. Development label implementation class.Hellotag_interface.java file content:Import javax. servlet. jsp. tagext. Tag;
Import javax. servlet. jsp. pagecontext;
Import javax. servlet. jsp.
The interaction between JSP and XML in the JSP and XML document published by skynet in May 2 only mentions one way to use the tag library. There are two important ways to interact between JSP and XML, therefore, in this article, I would like to
The first sentence in jsp:
Add in htmlNormally, there is no problem. .
In addition, set charset when importing js.However, ensure that all encoding methods are consistent.
No more:Solve js Chinese garbled characters in eclipse...Choose
The following methods can be used to redirect pages in JSP and Servlet:
Assume that you want to jump from test1.jsp to test2.jsp.
1. Jump in JSP:
1. Use the requestdispatcher. Forward Method for forwarding
Requestdispatcher RD = getservletcontext ().
List all common jsp scripts for data submission in the request form. For debugging, you can use
Save the code as showRequestParameters. jsp
You only need to include this file on the page for processing the form.
Include this page to view
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service