1. Download the source code of the jspsmartupload project. Http://www.zhenhua.org/article.asp? You can download the address id = 380. Decompress the downloaded source code to the webapps folder under the Tomcat directory, enable tomcat, and access
If you directly useJava ServletsYou will have to process HTTP input and HTML output in the Java class.Java programmingExperience to build complex applicationsProgram. The addition of JSP allows you to distinguish the HTML expression logic from the
This action is used to dynamically define an XML tag. can contain and .
It has only one attribute name.
For example:
An empty element is generated after execution:
Michael
James is the sales manager
After execution:
Generally, JSP runs in the following way: when the server is started and the web browser sends a page request, the web server first determines whether the request is a JSP page request. If this page is only a common html/XML page request
CodeTo the
JSPMediumIncludeAnother file has a very biased attribute calledFlush, Default value:False.
In the sameJSPIfIncludeItself (source file) will form an endless loop logically. By default, the server will wait until the file is read to the bottom and
1. Differences between calling JS events:
The JS event parameter of the JSP tag can be a tag, but the JSF tag cannot.
Input
Type
= "Text"
Onkeyup
= "Setsearch ('
# {Userselfaction. selfinfo. spacehost }"
/>
')"
Value = "query"
Question about JSP Chinese parameter passing: request. setcharecterencoding ("GBK") on the acceptance page; only valid for post submissionIf you want to thoroughly handle the problem, you can take the following measures on the acceptance page:String
// variable declaration connection sqlcon = NULL; // database connection object statement sqlstmt; // SQL statement object resultset sqlrst; // result set object string strsql; // SQL statement int intpagesize; // The number of records
The pagecontext object provides methods to access other hidden objects.
In the pagecontext object, you can use the following two methods to save and obtain attributes:
Setattribute (string name, object value)
Getattribute (string name)
1. actioncontext
In struts2 development, in addition to automatically setting request parameters to the action field, we often need to directly obtain the request or session in the action.(Session) information, or even directly to the
To put it bluntly, we will introduce the main functions of the code I wrote: This menu program can be used only by configuring XML, and one or more permissions can be set for each menu item during configuration, easy to use. You can download it as
How to display the server time synchronously on the client:
1. Use Ajax asynchronous commit to get the time, and then partial refresh the page.
2. Obtain the server time and accumulate the time on the local (client.
The first method obviously
If "relative path" is used in JSP, problems may occur.Because the "relative path" in the webpage is relative to the "URL request address" to find resources.What does the above sentence mean?For example:Assume that we have a project: MyAppUnder this
Statement: This article is an article from the blog site. When you query the relevant information, you will see the same results... It should have been seen, but I did not identify the true and false, so I copied it... Very speechless... Again, I
The current request can be forwarded to a static resource, JSP page, or servlet at runtime. The requested resource must be in the same context as the jsp request.
This action will terminate the execution of the current Ye Mi ang. If the page
If you are using a container that complies with JSP 1.2/servlet 2.3, such as Tomcat 4.x or higher, you can use the absolute path in the taglib command of the JSP page instead of the web. specify the taglib element in XML.
You still need to declare
(1) preface:To address the internationalization of web programs, character encoding must be performed anywhere using a UTF-8. (Including: Database settings: UTF-8, web pages also need to be set to: UTF-8)The advantage of doing so is that it can
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