Send email in JSP
We can send mail through any JSP engine (such as JSWDK) that supports the SUN.NET.SMTP package in the Sun specification.
(Warning: Use the built-in internal Sun specification package, which will affect the portability of your JSP
-Data pagination Display-JDBC 2.0:ODBC
Through the JDBC:ODBC can realize the JSP to the database operation, in this example I wrote the connection of the database in a JavaBean, can realize to reuse
pagetest.jsp file:
Database Paging Test
Although you can put a large chunk of program code in a small instruction file, most Java program code belongs to reusable components called JavaBean. JavaBean are like ActiveX controls: They provide known functionality and are designed to be
1. You can use:
Response.sendredirect ("http://www.foo.com/path/error.html");
2. You can manually modify the Location property of the HTTP header as follows:
Response.setstatus (httpservletresponse.sc_moved_
The following effect content needs to be implemented in the project. As shown in figure:
Specific implementation of the source code is as follows:
Two-box page Source:
Selected roles: Director Physician Nurse Front Office >
In the JSP page using the "" comment, the Java code in the note will be executed, you can view the page source code to see the implementation of the completion of the content, so that the code does not want to execute, affecting the load speed. For
A. JSP implied object response implementation file Download introduction
(1) The simplest way to implement a file download in JSP is to define a hyperlink to a target resource, and the user clicks the hyperlink to download the resource directly,
A. JSP implied object response implementation file Download introduction
(1) The simplest way to implement a file download in JSP is to define a hyperlink to a target resource, and the user clicks the hyperlink to download the resource directly,
Datetag.tld file:
1.0
1.2
date
http:// com.demo.util.datejstl/tags
date
com.demo.util.jstl.JSTLUtil
value
true
true
parttern
true
true
Referencing in JSP pages:
Use in JSP pages:
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
Often have friends ask, JSP and servlet What is the difference between the two and what is the connection between them? In fact, the advent of the servlet technology is very early, it was developed for Java server-side applications. We all know that
Author: danielmouse
Because my friend asked me to develop JSP before all to do something, wrote this article Dongdong.If a master mistakenly entered, please correct me, do not beat me Oh! :)
Pre-preparation software:J2sdk-1_4_0_01-windows-i586.exe---
Absrtact: There has been quite a lot of discussion about the problems of Java application in dealing with Chinese, and in contrast to most of the discussion, this paper discusses the problems of Java language processing in Chinese from the angle of
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 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