To make the page automatically return or jump after submission, add the following to the JSP page after the jumpCode!
// student. jsp is automatically redirected to which pageIn 2 seconds later, the system automatically returns the result. ///
65. JDBC: the abbreviation of Java database connection technology, a specification for accessing databases in Java, is essentially an Object-Oriented Java API,Function: establish a connection with the database, send SQL statements, and process the
JSPDynamic inclusion
Now let's take a look at the JSP dynamic include command:
Create a project testinclude
Then add the file:
Index. jsp:
index.jsp'srequest:
Curdate. Jsp:
curDate.jsp: curDate.jsp's request:
View
HTML descriptionStandard HTML comment. The JSP Container sends the comment to the client browser, but the comment is not displayed in the browser. You can view the comment by viewing the webpage source file. Syntax] --> AttributeDefault Name
Use JSP to read remote files and save them to a local device
Reading network files is somewhat different. I will give you a complete code and save it as JSP to run it directly.
//? PathString S1 = "http://www.google.co.jp ";// Local storage
This time, we made a simple registration page and used flex to communicate with JSP. According to the 4 practice, flex can use RPC to return XML Information output by JSP.
Make a registration page:
Including name, password, gender, age, and
(1) JSP comments
JSP annotation is used to mark the development demonstration during the program development process.
JSP comment: it is not output to the client
HTML comment: it will output to the client
(2) JSP Declaration
JSP is essentially
Of course, you must first create a table and corresponding columns for saving images in the database. The data format is blob.
package com.lizhe; import Java.io.*; import java.sql.*; public class PutImg { public void putimg() {
1. Jump to and pass the parameter by responding to the onclick method, and use reque. getparameter ("user") on another page to get the value of this parameter.Onclick = "location. Replace ('userprivate. jsp? User = ')"Here, RS is the return value
I used to upload a single image and want to upload multiple images at a time ~~
Document files.:
Package { Import flash. display. sprite; Import flash. events. event; Import flash. events. mouseevent; Import flash.net. filefilter; public class
1. pageencoding:
JSP page code: Code of the JSP file
2. contenttype:
Code displayed on the web page: the code displayed in the browser for the JSP output stream
3. html page charset:
Web page input encoding: font encoding entered in the
In JSP, include has two forms:(Note: Like other JSP elements, the include behavior element ends with "/" when there is no behavior body, just like the following." flush = "true"/>)
The following are the differences between the two include
There is no problem when uploading files with Chinese names on the web, but there is a problem during the download. After some searching, it turns out that Tomcat does not support Chinese paths and Chinese files by default, if you download Tomcat
Main Content: l complete other basic functions of the shopping cart; l generate orders; l Summary 1. Other functions of the shopping cart modify the number of items in the shopping cart and delete items are two basic functions. The implementation
First, download the tool:We recommend that you use editplus + JDK for beginners. I think it is convenient to use editplus + JDK, such as JB, eclipse, and jcreator, but it does not know how to configure environment variables for beginners,Thus it is
Three script elements in JSP:
Expression format JAVA expression. Calculate the expression and output the result.
The result obtained by calculating the Java expression is converted to a string and inserted to the page. Computing is performed
Download necessary files1) download Jakarta-taglibs:Http://people.apache.org/builds/jakarta-taglibs-sandbox/nightly/Extract the taglibs-image.jar and place it in/WEB-INF/lib.Copy taglibs-image.tld to/WEB-INF/2) download poor man's imaging wrapper:
JSF integrates with JSP through custom tags. All the previously displayed JSF labels, such as , , , and , are custom labels. As required by the specifications, the JSF implementation must support JSP by providing custom tags that access all standard
When Tomcat is started in eclipse, the following error is prompted:
2009-1-18 3:11:25 org. Apache. Catalina. Core. aprlifecyclelistener initInformation: the Apache Tomcat native library which allows optimal performance in production environments was
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