Learning about JSP

Source: Internet
Author: User
1. <JSP: Include page = "New. JSP "/> is to add a webpage to the current page without passing in parameters. To pass in parameters, use <JSP: param> in the format of <JSP: include page = "New. JSP "> <JSP: Param name =" "value =" "> </jsp: Include>. The action ID is used to dynamically modify the content of a webpage. For example, the required webpage can be divided into the top, bottom, and bottom parts. If the middle part changes frequently, You can include a page;

2. <JSP: Forward page = "Other. JSP "> the action identifier is that after completing some operations, you can transfer the request to another page and add the content of that page to the current page. This action does not change the URL. You can add parameters;

 

3. In JSP, place a hyperlink in the webpage to the webpage itself. When you click this hyperlink, you can update the page. For example, there is a hyperlink and the anchor is a number, the hyperlink points to the webpage where it is located, and there is a small one at the beginning of the webpage.ProgramYou can increase the number by 1 and use the new number to create a new hyperlink. This forms a Web page that can be clicked and refreshed continuously,CodeAs follows:

 

<% @ Page Language = "Java" Import = "Java. util. * "pageencoding =" gb2312 "%> <% string num = request. getparameter ("num"); int next = 0; If (num! = NULL) Next = integer. parseint (Num) + 1; %> <! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en"> <HTML>  

4. After response. sendredirect, follow the return statement, so that you can directly jump to the code after running.

 
 
5. If page a uses the JSP: include command to include another page B, and if there is an automatic refresh command in page B, the page A will be refreshed together.
 
6. Create charts and use fushioncharts. This is a great plug-in.
 
 
Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.