1.1 Java Servlet and Its FeaturesServlet is the answer of Java technology to CGI programming. Servlet programs run on the server to dynamically generate Web pages. Compared with traditional CGI and many other CGI-like technologies, Java Servlet is
For example, how to configure environment variables and How to Run Servlet? There are too many such problems. Now I want to write a beginner entry, so that it can be helpful for beginners!
First, download the tool:
I suggest using Editplus + JDK for
Every project will go through the database for a while. It was previously well handled, because it is based on tomcat (a very useful JSP running platform) 5.0, whether it's with ORCALE SQLSERVER2000 or MySQL (the best combination with PHP), I 've
The following three statements are used on the jsp (preferred for SUN Enterprise Applications) page to ensure gbk encoding.
Use the following statement to connect to a database:String sConnStr = "jdbc: MySQL (the best combination with PHP): //
Response. setContentType ("text/html; charset = gb2312 ");Request. setCharacterEncoding ("gb2312 ");
Out. print ("========================== Test for thumbtail picture ================ ");
// ----------------------- After the upload is complete, the
Notes for actual operations:
The \ In the reg file cannot be changed; otherwise, the import will not be performed in the registry.Iis6.0 and tomcat (a good JSP running platform) can be configured successfully under 4.1.Port 9003 is actually the
The Excel report method is too simple. One method can only be used on the window platform (because jdbc-odbc bridge is used) and various formulas or methods in Excel cannot be used. Therefore, today, we will introduce an apache component called POI,
8) labels:Forward a request object. You can pass parameters. The target file must be able to process parameters.And before use, jsp (the first choice for SUN Enterprise Applications) files already have data, so the File Execution will fail.Attribute:
Because ajax (static dynamic websites) brings us too many benefits, we will give priority to this technology in many applications, so I am also attracted to it, we will share with you the next simple example.Regist. jsp (preferred for SUN Enterprise
Break the JNDI connection pool --After several days of hard work, I can finally connect to the connection pool. I have referred to many of my posts on this topic. Now I have written several issues that have occurred over the past few days here:I. in
Note: The following urls do not contain ContextPath.
Servlet ing URL specification
1. Indicates path ing starting with/and ending with/*, that is,/Test/* indicates that the request path starts with/Test/is mapped to the Servlet for processing.2.
I downloaded the jsp (preferred for SUN Enterprise Applications) smartupload class, and then compiled the download program, as shown below: MySmartUpload. downloadFile ("d: \ 111.txt ";%>After the script is run, the content in my txt file is
Jsp (preferred for SUN Enterprise applications)Mark learning notes
Ginkou. fly2002-9-18
1.Overview
1)What isJsp (preferred for SUN Enterprise applications)Mark
As the name suggests,Jsp (preferred for SUN Enterprise applications)Mark is
Create multiple mappings for a Servlet
What should we do when we want to create multiple names or URL patterns so that web users can request a servlet?
You can configure multiple servlet-mapping related to servlet elements in the deployment
Send data to the client in jsp (preferred for SUN Enterprise applications)
/**@ Author: ciqinqiang@ Email: cqq1978@Gmail.com*/
Someone often asks the following question: "How does a server program output a file to the client and then let the browser
Lion interactive network = "example of reading and writing files in jsp (preferred for SUN Enterprise Applications)
// Write an objectString str = "WWW. LIONSKY. NET ";String filename = request. getRealPath ("lionsky.txt ");Java. io. File f = new
An online examination system tests your knowledge of jsp (the preferred choice for SUN Enterprise Applications). The Code is not very large, so no comments are added (http: // jsp (preferred for SUN Enterprise Applications)
Server method:Response. setHeader ("Pragma", "No-cache ");Response. setHeader ("Cache-Control", "no-cache ");Response. setDateHeader ("Expires",-10 );%>Add this code on the login page and after login page.Note that you must make the session invalid
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