CopyCode The Code is as follows: con. setautocommit (true); // set it to true. Each executeupdate is executed immediately.
SQL = "insert into Table1 (lable1) values ('001 ')";
Rs = stmt.exe cuteupdate (SQL );
SQL = "insert into Table2 (lable2)
For example:
CopyCode The Code is as follows: hibernatetest. Java
Import onlyfun. Caterpillar .*;
Import net. SF. hibernate .*;
Import net. SF. hibernate. cfg .*;
Import java. util .*;
Public class hibernatetest {
Public static void main (string []
Every developer who uses servlets now knows that JSP is a Web technology invented by Sun and put a lot of effort into implementation and constructed on top of Servlet technology. JSPCodeThis can accelerate web application development and page
1. What is JSP (JSP pages) is a dynamic web page technical standard proposed by Sun Microsystems and jointly established by many companies. Its website is http://www.javasoft.com/products/jsp. Add Java to traditional webpage HTML files (*. htm, *.
Is to put the first JSPProgramThe background section in is encapsulated in the JavaBean. In my opinion, the JavaBean is the same as the OCX control in ASP. It is concise and easy to use. It is a Java class used by JSP, which is essentially no
JSP is as follows:
**********************
Int curpage = 1; // current page
Int page_record = 20; // number of records displayed on each page
// Use the following method (SQL query is completed, and the speed is fast)
Curpage = integer.
Author: Builder. com
JSP provides many simple and practical tools, including reading data from the database, sending data, and displaying the results in a pie chart. Now let's take a look at this simple and practical method.
What you need
Package coreservlets;
Import java. Io .*;Import javax. servlet .*;Import javax. servlet. http .*;
/** Sets six cookies: Three that apply only to the current* Session (regardless of how long that session lasts)* And three that persist for an
In JSPProgramThere are not many opportunities to use COM components in. jsp does not directly operate COM functions, but sometimes some work must be completed using COM components. The following describes the specific operation methods.There are two
Cookie should be a technology that has been used for a long time. As early as the advent of HTML, there was no way to record and identify different users between each independent page. Later, people invented the cookie technology. When a user
Call method: Use Image labels on the JSP page to directly call the following labels:
Code
you only need to send the code to the area where the verification code is displayed)
Public static string code =
Today, I reviewed the JSP script elements and comments, and wrote the case. After debugging, the overall summary is as follows,
1. JSP statement:
The variable in the declarative statement is a global variable. When multiple users execute this JSP
Other JSP articles:
Use the automatic Bean property filling mechanism in JSP
JSP: list server environment variables
Implementation Mechanism and Application of abnormal turning of JSP errorPage commands to error pages
Jsp uses the 404 error page to
Text/bingo_ge
Using proficiency, proficiency, familiarity, and understanding in this article marks your mastery of a technology.
Proficient: 85% or more technical points of the technology, more than two years of use of the technology, and the use of
Today I have nothing to worry about. I suddenly thought of a problem. Can I replace the suffix for accessing JSP files with my own suffix? After some debugging, I finally succeeded. Hahaha. So happy .....First, configure testsuffix mytest.
Summary
When programming for server components, you may need to obtain the actual path of a file from the path relative to the web root, but this file is actually on a virtual path of the site.
What is a virtual path?
On a web server, the virtual
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