1. homepage (enter a name) (optional, form post to time. jsp ):
Omitted
2. determine the time forward to different pages:
Time. jsp:
CopyCode The Code is as follows: Document: Index
Created on:, 15:48:00
Author: Lucifer
--
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)
Servlet three elements:
1. must inherit from httpservlet
2. doget () or dopost () must be implemented ()
3. servlet must be configured in Web. xml
Httpserveltrrequest: request objectGetparameter (): Get the value of the form
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 =
A web project does not have a web. xml file. That is to say, the Web. xml file is not required by the web project.
So when and when?To answer the above question, you must first understand what the web. xml file is used. The Web. xml file is used
Using custom tags in JSP can achieve this purpose. In fact, all the frameworks we know are basically implemented in the form of custom tags.
By using custom tags, We can display complex logic on pages with simple tags. Next we will implement a very
1. jsp
Code :
Copy code The Code is as follows: Document: Application
Created on:, 13:18:53
Author: Lucifer
-- %>
Http://www.w3.org/TR/html4/loose.dtd>
JSP page
Get server info:
Get context path:
Get real path:
2. output: copy
However, the real IP address of the client cannot be obtained through reverse proxy software such as Apache and squid. If the reverse proxy software is used, the IP address obtained using the request. getremoteaddr () method is 127.0.0.1 or 192.168.1
Document directory
Detailed description of the web. xml file
I,
1. When starting a WEB project, the WEB Container will read its configuration file web. xml and read the and nodes.
2. Urgent: Create a ServletContext. All parts of the web
Servlet has a very interesting and useful function, that is, Filter. The so-called Filter is a small program that is executed after the user request arrives at the Servlet or after the Servlet is executed. This program can pre-process the user
Document directory
What is Servlet and JSP?
MVC model
What is Servlet and JSP?
There are two main technologies used to develop Web applications using Java: Servlet and JSP. Servlet is a Java program executed on the server.Servlet ContainerThe
Nine implicit JSP objects:
Object Name
Description
Scope
Data Type
Request
This object encapsulates the details (parameters, attributes, header labels, and data) of HTTP requests generated by WEB browsers or other
1. When declaring a variable: (generate the variable into a member variable of the servlet class, multiple clients share one copy) and when using (only a local variable in a method, each client has one), try to avoid declaring a variable as a
There are a basket of online processing methods. The following describes two effective solutions I have used.
1. Compile a string processing function for the program, save it with a static file, and include it in the JSP page for processing Chinese
1. Set errorPage: errorPage. jsp
Copy codeThe Code is as follows:
JSP Page
Error ~!
2. ApplicationCopy codeThe Code is as follows: // go JSP Page Boolean tf = true;If (tf ){String info = getServletInfo ();Throw new Exception (
After searching for a long time, I finally found a jsp that can be used ...... Share !!
Copy codeThe Code is as follows: PageEncoding = "UTF-8" %>
Management Area
Cellspacing = "1" class = "table_style">
Product image: Solid;
1. Create a report style in Word or Excel.
The Row Height and column width in Excel cannot be expressed in mm or cm.
Computing required. In 1024*768, 1CM is about 38 pixels.
Based on this, you can calculate and control the row and column positions
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