In generalProgramIn the traditional mode, follow these steps:1. Create a database connection in the main program (such as Servlet and beans.2. perform SQL operations to retrieve data.3. Disconnect the database.There are many problems when using this
To create a simple tag:
CreatedTagTag processing of the interface (javax. servlet. jsp. tagext. Tag)ProgramClass.
Create a TLD file.
Create attributes in the tag handler Java class.
Define the attributes corresponding to the
Before testing the page function, we found that when you press the Enter key in the input field of input type = "text", the form will be automatically submitted, then, the submit button is changed from the submit type to the button type.
This
After eclipse3.2 is installed and myeclipse is used to develop JSP, myeclipse will die after a prompt "." is displayed, and no response is returned. In the end, it can only be turned off and restarted. The problem still exists.
Solution:Just
Address: http://www.cnblogs.com/cjsh/articles/36271.html
I have been learning JSP for a long time, and I will never configure it. Today, the configuration is successful, so I will write this articleArticle,Hope to help beginners. If you have any
OutOut. Print (); // output dataOut. newline (); // output a line breakOut. Flush (); // output data in the bufferOut. Close (); // close the output stream.Out. clearbuffer (); // clear the data in the buffer and output the data to the client.Out.
How to create a simple tag processor?
Three things need to be done:
I. Compile a tag processor (Java file)
2. Describe the tag (TLD file) in the tag library descriptor File)
3. reference the tag in the JSP file
Procedure:
Step 1:
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
Last week, the leader told me to deploy a JSP project. Since I have never been in touch with JSP, I immediately found some documents on the Internet about how to deploy the jsp project in Apache Tomcat 5.5. In fact, this is not difficult, but it is
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
There are five types of JSP compiler guidance and Directive elements. after JSP1.0, most of the JSP files are contained in a single tag ending. the new JSP1.1 specification has been published, and it is also compatible with XML.
The compiler guide
At present, both blog forums and enterprise offices cannot do without sharing resources. By uploading files, we can share them with you to achieve extensive communication and communication among the masses. We can gain more knowledge and experience
In three steps:
1. Create a folder named tlds under the WEB-INF, and then create a tld file, such as formatTime. tld, the content is:
Copy codeThe Code is as follows:
Http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd>
1.0
1.1
ntuc
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