Dynamically set read-only/read-write for a component on the page
Document. getelementbyid ("custname"). readonly = false;
Document. getelementbyid ("custname"). readonly = true;
Dynamically hide/display a widget on the pageTDID. style. Display =
1. Access the value returned by JS in JSP:
Problem:
CopyCode The Code is as follows:
How can I obtain the STR value in Javascript from AA in this JSP ????The details are as follows:Copy codeThe Code is as follows:
Solution:It must be submitted
Is your J2EE application running slowly? Can they withstand rising traffic volumes? This article describes how to develop high-performance and highly elastic JSP pages and Servlet performance optimization technologies. It means to build as fast as
1. Javascript. Set a variable and submit it only once.
2 or Javascript. Set the submit button or image to disable.
Onsubmit = "getelbyid ('submitinput'). Disabled = true; return true;">
3. Use the struts synchronization token
Package coreservlets;
Import java. Io .*;Import javax. servlet .*;Import javax. servlet. http .*;
/** Sets six cookies: Three that apply only to the current* Session (regardless of how long that session lasts)* And three that persist for an
Cookie should be a technology that has been used for a long time. As early as the advent of HTML, there was no way to record and identify different users between each independent page. Later, people invented the cookie technology. When a user
After I modified connectorservlet. Java and simpleuploaderservlet. Java two files, regenerate the fckeditor-java-2.3.jar package, to solve all the garbled problem, there are three to modify
1. modify the character encoding of the Web Container. If
It can be different from PHP, JavaScript, ASP, ASP. NET, ColdFusion, Java, and ABAP.Programming Language. "Fck" in the "FCKeditor" name is the abbreviation of the author's name Frederico Caldeira knabben.
Download the FCKeditor Control from the
String agent = request. getheader ("User-Agent ");
Stringtokenizer ST = new stringtokenizer (agent ,";");
St. nexttoken ();
// Obtain the user's browser name
String userbrowser = ST. nexttoken ();
// Obtain the user's OS name
String useros = ST.
1. Configure the context. xml file
CopyCode The Code is as follows: Name = "JDBC/books" // The reference name can be customized.
Auth = "Container" // specify the manager for datasource Management
Type = "javax. SQL. datasource" // specify the
Please refer to the main principle of http://blog.hunan2s.com/article.asp? Id = 233
After debugging, it is successful .. Ah
Add the source code ..
JDK 1.5 + ECLIPSE + TOMCAT 5.0.28 + MYSQL 5.0
Database TEST, table name newsField: id int
Four random numbers and messy background images are generated. The numbers and background colors change, and the server refreshes (with history. go (-1)Prototype reference ALIBABA http://china.alibaba.com/member/showimage
File that generates the
With the development of WEB technology, WEB content ranges from static pages to dynamic pages with rich content. Dynamic page generation is a challenge for WEB developers. There are many ways to solve this problem, such as plug-in technology and
String month;
%>
Year = request. getParameter ("year ");
%>
day
Days = new String [42];
For (int I = 0; I {
Days [I] = "";
}
%>
Calendar thisMonth = Calendar. getInstance ();
If (month! = Null &&(! Month. equals ("null ")))
ThisMonth. set
Use JSP to read client information
Read the following code. If you have different requirements, you can easily modify these codes. These codes give you the following:Company, user name, version, main version, minor versionOperating System
Author: Xu Chunjin
Below are some of my experiences in learning JSP:
I. Working Principles of JSP
When a JSP file is requested for the first time, the JSP Engine converts the JSP file into a servlet. The engine itself is also a servlet. In JSWDK
Custom tags)
(Prepared study notes)
Step 1. Create a Tag handler class (Tag Processor class)
Package javax. servlet. jsp. tagext
Develop a label processor class for an empty Body -----> 1) implements Tag 2) extends TagSupport
The method of
Save, update, and delete data:
1. Session. save () method:
The Session. save () method is used to persistently store object objects. That is to say, when session. save () is executed, an insert SQL statement is generated to save data. The following
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