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"
Session Object
The session object is an instance of the Javax.servlet.http.HttpSession class. Has the same behavior as the session object in the Java servlets.
The session object is used to track sessions between individual client requests.
Main
If the parameter value is in Chinese when the request parameter is obtained through the requests object, the obtained parameter will be garbled if it is not processed. In JSP, to solve the request parameters are the Chinese garbled situation, can be
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
The problem of garbled characters after turning pages
JSP page:
Many times we have set the code for the project for UTF-8, can or will appear garbled problem, today I do a page pass the garbled problem, consulted the cloning, the results
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,
Presumably everyone is using Eclipse Programming , this problem is often encountered.
The reason is that the JSP did not compile successfully, so the class could not be found.
Here's how the JSP and Servlet are compiled.
Jsp
For example
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
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
Modify the \ conf \ WEB. xml file in the Tomcat directory and find the followingCode: JSP org. Apache. Jasper. servlet. jspservlet fork false xpoweredby false 3 Add the following line of code between JSP org. Apache. Jasper. servlet. jspservlet 3:
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. Page Object
The page object represents the JSP itself. More accurately, it represents the servlet after JSP is translated. It can call the methods defined by the servlet class.
Ii. config object
The Config object stores some initial servlet
Java Server Page (JSP) is becoming increasingly popular as a technology for creating dynamic web pages. JSP is not the same as ASP, PHP, and working mechanism. Generally, JSP pages are compiled rather than interpreted during execution. Calling the
I. Preface
From a website, I saw a code "webpage capture", which was a bit interesting, but did not provide the source code. So I wanted to write it myself. In fact, the code is relatively simple.
Ii. Code
String scurrentline;
String
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