Format the string type in the JSP page to the specified type
The javabean corresponding to the database table is stored in string type. Because the JSP page is displayed in the form of "2017-07-3 00:00:00.0", I want to display it as "2017-07-3"
Basis:
One. Introduction to JSP 1. Understanding: Java server page; Embed Java scripting language in HTML2. Compare servlet and JSP1 The servlet is suitable for business processing, and JSP is suitable for interface display2 The JSP file will
when using AJAX to send an asynchronous request path in a JSP, beginners are difficult to control. It is recommended to use JSP built-in C tag library.
Add on page header:
Request server, modify quantity.function sendupdatequantity (ID,
What is a session?
Session represents a client-to-server conversation
The session in the Web refers to the amount of time that a user has spent browsing a website, from entering the site to the browser closing, that is, the time it
ServletIs a server-side Java application.ProgramIs independent of platform and protocol and can generate dynamic web pages.It serves as the intermediate layer between customer requests (Web browsers or other HTTP client programs) and server
Note: to verify whether the verification is null, you must first ensure that the verification is performed before the form is submitted. If there are empty items in the verification result, the form cannot be submitted and a verification error
In JS functions, the form. action cannot jump to the target servlet. You can use alert () to determine the step in the function and the result is complete. If the path is wrong or the servlet ing is incorrect, the check will be correct for a long
I have always liked JSP 2.0, but I do not know enough about the tag library of JSP 2.0. Therefore, I learned that there is one type of tag library that can be calledThe tag of the function-based tag library is mainly used to call static function
1. cache report source
Cache the report source in session variables so that the report source can be effectively used multiple times. When a report source is not cached, It is very expensive to create a new report source multiple times. In addition,
There are two pages, A. jsp and B. jsp. A. jsp has a submit operation, and B. jsp is the action of the submit operation,
In. add to the JSP page. On ie6.0,. the content of the JSP window is changed to B. JSP, and. JSP content addition will be
Classic getting started Tutorial: JSP standard template library (below) jstl tag Library
Jstl is generally considered a single-tag library. However, jstl actually has four tag libraries. These tag libraries are summarized as follows:
Core tag
Dynamic web page (JSP, JSF) bug in tomcat5.5.23:
JSP: test JSF:
When you click the two links above, you can see what happened: the page jumps to the Web homepage !!! But for HTML pages, it cannot be said !!!
We recommend that you use
1. Forward request jump
Request. getrequestdispather (""). forword (request, response );
Features:
(1) the address bar remains unchanged. Cause: Because the address bar remains unchanged after the jump, the address before the jump is refreshed,
// Sometimes the user wants to download the file, but the file type is associated with the browser in the system, and the result is opened in IE.
// Common examples include Word, Excel, and PDF. Therefore, converting a file into a data stream allows
Preface
In JSP web projects, the file upload function is likely to be used.
Upload a local file to a path on the Web server.
For Java, there are many open-source components that implement such functions, such as commons-fileupload, and so on
When using a formThe parameter cannot be converted correctly.To the input. jsp page.
For example, we have a real student with attributes such as name, num, and age.
Student. Name, student. Num, and student. age should be sent from the
JSP Elements
(1) Directive Elements
Occurrence time: compiled and executed during compilation
(2) script elements
(3) Action elements
Occurrence time: each time a client request is sent, it is executed once.
• An action is a special identifier.
JSP reference (3) Directive element [direve VE]
descriptionThis command can only be used in tag files. It declares the attributes supported by the Tag file. Syntax[Required = "True | false"] [fragment = "True | false" | [type =
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