Ajax Dynamic Delivery page, JS Ajax writing, using ID identification to pass objects
For example: Now there is a demand, a page, divided into about two blocks, the left navigation menu has a user list information function button, want to be on the
In the tutorial above we have learned how to embed a Java expression between the character series in a JSP Web page. But it's hard to do a lot of programming work by putting Java expressions into HTML.
JSP also allows you to write Java code
In our previous chapters, any HTML file can be transformed into a JSP file by changing its extension to. jsp. Of course, we need to know what makes JSP useful? The answer is the ability to embed Java. Place the following text in a file with a. jsp
Method 1:The following procedure executes the Opentheindexpage () method when the page is fully loaded
Copy Code code as follows:
telecommunications Data Collection system
Method 2: Can be the following, but
1. Use JavaScript
Copy Code code as follows:
Or:
Copy Code code as follows:
2. Use HttpSession to empty session, exit the current login.
Copy Code code as follows:
Exit
In the JSP, let the picture be centered in the Div, as shown above
Example:
Copy Code code as follows:
CSS file
Body file
If in the HTML, there will be that effect on the
In the ASP I have told friends how to let the ASP program does not read data from the cache, but also in the JSP can be implemented, please see below:
1, using Java-provided methods, either in a JSP or in a servlet
Response.setheader ("Pragma",
The JSP compiler guidelines and instruction components have five types. After JSP1.0, most of the JSP is contained in a single tag that ends. The new JSP1.1 specification has been published and is also compatible with XML.
The compiler guidelines
In Google's process to see this article ("Nicedit in jquery can not get the textarea value") to get an inspiration, that is, you can read out the Nicedit Rich Text editor with JS content, assign its contents to textarea, and then submit the form.
Today there is nothing, suddenly think of a problem, can access the suffix of JSP file to my own suffix it? After some of their own debugging, finally succeeded. Hahaha. So happy ...First of all, configure in WEB.XM.testsuffixmytest.
If the page in the jsp:include is garbled, you need to add the in the page that uses the
Request.setcharacterencoding (' UTF-8 ');/or specified encoding (GBK or other)%>As shown in the following:
Copy Code code as follows:
jsp-include.
Introduction to Taglib Instructions
The taglib directive, in fact, is to define a tag library and the prefix of the custom label.
such as struts in support of the tag library, HTML tag library, bean Tag Library, logic tag library.
One of the
First, write a hyperlink somewhere on the page you're logged on to:
Copy Code code as follows:
Exit
Let it link to the exit.jsp page, and then create a new exit.jsp page to write the following code in its body:
Copy Code code
Jsp+ajax implementation without refreshing, the mouse left the text box is to verify the user name, the operation is as follows: Create a new input page, named Input.jsp,
Copy Code code as follows:
jsp+ajax Implement no Refresh _
1. When declaring variables: (converts a variable to a member variable of a servlet class, where multiple clients share one) and the (just a local variable within a method, one for each client) is used in the process of Try to avoid declaring a
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