This article illustrates the common query and display methods of JSP pages. Share to everyone for your reference, specific as follows:
Background:
1. You need to display the results of a database query as a list in a JSP2. In a good Java EE mode,
This paper analyzes the similarities and differences of c:foreach traversal and s:iterator traversal in JSP. Share to everyone for your reference. Specifically as follows:
①jstl C:foreach
First, let's look at an ordinary servlet:
Import
JSP (JavaServer pages) is a Dynamic Web page technology standard, which is initiated by Sun Microsystems Company, and is built by many companies, and its Web site is http://www.javasoft.com/products/jsp. This technique provides a simple and quick
Use Ajax to refresh JSP content in a div
Copy Code code as follows:
If you let this div automatically refresh, you can use SetInterval (' Startrefresh () ', 5000), which is the function of automatically performing a Startrefresh
Note: The prerequisite for verifying that you are empty is to ensure that it is validated before the form is submitted. If the validation result has an empty entry that restricts the form from submitting, and prompts you to verify the error message
Click on the page a delete button, pop-up ok dialog box, OK, the page will jump to the delselect.jsp page to perform the deletion of the data in the database, after the successful execution and automatically jump to a page. In the process and for
This article from: Click to open the link
Accustomed to the JS frame ext,jquery and so on. Suddenly to use JSP+CSS to achieve the effect of the label page, suddenly do not adapt to the internet so a bit to find a good way to achieve, now quote:
Problem Description:When a page uses tags commits, it appears [Springmvc]javax.servlet.jsp.jsptagexception:neither Bindingresult nor plain target An object for Bean exception.Cause Analysis:The, tag has a default property commandname when the page
JSON implementation, the data will be needed to upload to the JSP page;1> Add three shelves to Lib that implement JSON;2>: Add annotations to the top of the target method and need to return the value3> Write the jquery method in the JSP page;The Web.
Web apps generate thumbnails for uploading pictures is a common basic function, through thumbnail generation to improve the performance of information browsing, in order to ensure the user experience and reduce the amount of data transmission. This
The main function of JSP action is the corresponding processing according to the specified action.First, Param actionUsed to pass parameters to HTML files and JSP files, often combined with forward, include, plugin actions, Syntax format: Second,
Set and obtain the page range attribute: page_scope_01.jsp The code is as follows:Copy code Test PageContext. setAttribute ("name", "James ");PageContext. setAttribute ("birthday", new Date ());%>String username = (String) pageContext.
Jsp tutorial request. getHeader ("User-Agent") to get User browser information Browser Check String userAgent = request. getHeader ("User-Agent ");If (userAgent. indexOf ("MSIE ")! =-1 ){%>You're using Internet Explorer.You're probably using
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