Js Code Feeds Lorem ipsum dolor sit amet, consectetuer adipiscing elit News Lorem ipsum dolor sit amet, consectetuer adipiscing elit Shopping Lorem ipsum dolor sit amet, consectetuer adipiscing elit Links Lorem ipsum dolor sit amet,
Js regular expressions are used to determine whether a string must contain uppercase letters, lowercase letters, numbers, and special characters. The length must be between 8 and 64.
Not to mention writing regular expressions directly
Java code/^ (
Servlet Page code: @ each request generates a token (usually a timestamp), which is stored in the session and submitted with hidden, in the servlet, check whether the received tokens are consistent with those in the session to determine whether
1. Jsp labels are the logical business functions provided, so you can avoid writing java code in jsp. The main labels are
Other jsp files can be included in double quotation marks.
jump to the tab jump page. You can directly add
You can
1. Integrate Struts2A) import the struts jar packageStruts2-core-2.1.6.jar xwork-2.1.2.jar ognl-2.6.11.jar freemarker-2.3.13.jar commons-logging-1.1.jarB) copy the struts. xml file to the src directory.C) configure the struts core filter in web. xml.
The removal of JavaBean varies with different ranges. Page range, request range, session range, and application range use pageContext, request, session, and application All methods use the removeAttribute () method. Example 0102030405 set the page
You need to download the jspSmartUpload. jar package by yourself before using it.
Here we find a jar package that supports Chinese characters, as shown below: http://www.bkjia.com/uploadfile/2012/0426/20120426093645364.rar
Copy the jar in the
To query a database on the JSP page, you can connect to and query the java code section of the database and the html page code section. This page is implemented in three steps
1. Write the database connection code.
2. Write the code used to display
The first file below is pageSupport mainly processing various parameters.
Package net. spring. service;Import java. util. List;Public class pageSupport {Int pagesize = 2; // number of entries per pageInt totalCount; // The total number of items.Int
1. Session Save User NameWe often encounter this situation when surfing the Internet:Automatically log on after successful registrationAfter logging on, remember the user status and display the user name on multiple pages.
In fact, these effects use
1. demonstrate traditional custom labels (earlier than jsp2.0)
Use custom tags to control whether the page content (TAG body) is output, and use the doStartTag () return value to control
Return this. SKIP_BODY; // ignore the label body.
Return this.
Runtime Environment: myeclipse8.6 + jboss5.1 + jvm1.6 first look at the final directory structure: directly on the source code: complexFormTag. jsp: [html] complex example of using form labels doubleselect label example : If Struts2
This article aims to correct some incorrect articles on the Internet!
Development steps:
First, create a class:
Inherit BodyTagSupport
Then set the field generation set Method
Class:
[Java] package org. pan. tags; Import java. io. IOException;Import
Use AJAX to refresh the jsp content in a DIV
If you want this div to be automatically refreshed, you can use setInterval ('startrefresh () ', 5000) to automatically execute the startrefresh method every five seconds, another method is
Disable cache settings on jsp pages1. The client cache should include the following content in :Or2. Disable caching on the dynamic web page of the server. Add a script similar to the following:Response. setHeader ("Pragma", "No-cache ");Response.
Since I first came into contact with java, I often see some experts on the Forum talking about the framework cloud. Every one of them feels that what they know about the framework is really great. Envy, envy, and hate cannot be used as food. We also
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.