(i) Get the files and directories in the current directory
Knowledge points
1 Application of the file object2 Listfiles () method3 Isdirectory () method, Isfile () method to determine whether a directory or file4 Conversion String Method
1. Background
Today dealt with a very aching need, service end of two values, in the JSP page to determine whether one of the values contains another value, using a number of label methods, not the syntax tag structure error is the data structure
Colleagues have developed a Firefox plugin, used to read card information contactless card, but the page will not call, after the data found in fact quite simple, that is, more pits.
Testing
embed is the loading of Plug-ins, Getcard () is
Myeclipse sets the default encoding method for JSP pages:
Windows-preferences-myeclipse-files & editors-JSP-encoding on the right: Set to iso000046/Unicode (UTF-8)
In the Java file, myeclipse sets the author, date, and other instructions:Windows-
Pageencoding = "gb18030" errorpage = "errorpage. jsp" %>Int I = 5/0;%> record page display my personal forms
There is an error in this page, and the error page has been directed to handle_errors.jsp, And that page is correct.
However,
At work, the following similar section is often seen on the JSP page.Code:
Response. setheader ("cache-control", "No-Cache"); // HTTP 1.1 response. addheader ("cache-control", "No-store"); // Firefox response. setheader ("Pragma", "No-Cache"); /
//ProgramName: Download// Program functions:// Creation date: 08:49:52// Created by: yanchao// Update record: reason/content of the updated person's update date//%>
Response. setcontenttype ("application/X-download"); // set it to download
Normal print (full page)
Print part of the content in the webpage (custom) print remove/Add the header and footer use external controls/methods to achieve multi-function printing print background
The above is code control
Set "page settings" to set
The following example shows how to use JavaScript to change the applet status and call the method in the applet in Javascript.
1. Applet source code (tmin_js2.java)
// ImportImport java. AWT. graphics;Import java. AWT. event;
// Liveconnect... for
This article mainly introduces how to use sysdeo eclipse Tomcat launcher plugin to edit and debug JSP and Servlet. It is best to first refer to my previous article "Illustration using eclipse3.0.1 + lomboz3.0.1 + tomcat5.0.28 to develop jsp" series,
How can a webpage written in JSP contain Chinese characters when passing parameters? 2011-06-21 17: 58 yuqiangdede
| Category: other programming languages | browsing 428 times
"> request in servelt. setcharacterencoding ("gb2312"); response.
I. Overview
In Web applications, the generation of some reports may take a long time for the database to calculate. Some websites provide weather information, which requires access to a remote server for soap calls to obtain temperature information.
I. jsp connection to oracle8/8i/9i Database (in thin Mode)
Testoracle. jsp is as follows:String url = "JDBC: oracle: thin :@ localhost: 1521: orcl ";// Orcl is the SID of your databaseString user = "Scott ";String Password = "tiger ";Connection conn
Define the unified coding of the Java/J2EE system as a UTF-8. UTF-8 coding is a way of coding compatible with all languages, the only trouble is to find all the entrances and exits of the application system, and then use the UTF-8 to "ligation" it.
Some code has been commented out because it has an impact on other code during local debugging.
1. Redirection/Refers to 127.0.0.1,If not, add the specified Page name from akazamtest01.There cannot be two response. sendredirect ("")If the HTTP
JavaIn recent years
JavaSe 5 and
JavaThe launch of Se 6,
JavaThe future is even more brilliant. However
JavaBasic
JSPIn
JavaSe 5 has been unable to lift its head before its launch. The most important reason is
JSPAlthough the function is very
ServletAnd JSP knowledge Review (2) servlet Basics
· Generate HTML Servlet
· Inform the browser of the HTML when the browser sends the message next
-Response. setcontenttype ("text/html ");
· Modify the println statement to build a valid Web
Many new JSP beginners often ask how to connect to the database. Why are there errors? Therefore, I wrote an article here for your reference. In fact, it is not a good practice to put all the database logic in JSP, but it is helpful for beginners to
Made a system. The user_add.jsp page and the user_list.jsp page are displayed.
Add the chinese user name "I love you" and the password "123"
Garbled characters are displayed on the display page. An error occurred while displaying Chinese
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