JSP pageencoding and contenttype attributes
JSP requires two "encodings". pageencoding is used in the first stage, UTF-8 to UTF-8 is used in the second stage, and the third stage is the webpage from tomcat, with contenttype.
Differences between
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
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
1. Which of the following methods are generally implemented during servlet execution?A: Which of the following methods are generally implemented during servlet execution?(1) Public void Init (servletconfig config)(2) Public servletconfig
Problem: we want to receive XML Information sent from JSP and store it in the DataGrid component.
Steps:
response. setcontenttype ("text/XML"); connection con = NULL; resultset rs = NULL; con = bean. getconnection (); string SQL =
1. jsp header
2. Request. setcharacterencoding ("UTF-8"); character encoding of the request submitted on the JSP page
3. the header information of the JSP page Processing request is the same as that of the first and second
4. transcode the request
Simple Test on TomcatCreate a helloworld directory under the examples directoryTomcat 6.0/webapps/examples/helloworldCreate the test. jsp file.HTTP: /localhost: 8103/examples/helloworld/test. jspRun.
Lesson 11. Add dynamic code2. Applet 3.Lesson 31.
I. jsp tag system
Ii. Tag execution process:
III.Custom tags;
3.1 The main role of a custom tag is to remove the Java Script in JSP. It belongs to JSP Technology
3.2. Procedure for compiling a custom tag: (definition of a traditional tag)3.3
Recently, a JSP website needs to receive data from the instrument. The data is transmitted using the POST method, but the format is enctype = "multipart/form" and cannot be obtained using the Servlet request, it has brought some trouble. After a
1. Javascript parameter passing: this parameter passing method uses the opener keyword to implement cross-page parameter passing. Its usage is to use the opener keyword to call a component of the parent form.
Example: opener.myform.txt. value =
Dynamic and Static inclusion
Dynamic includeUse the JSP: include action to implement always checks for changes in the contained files. It is suitable for inclusion of dynamic pages and can contain parameters.
(Here you must use flush = "true". You
Preface
Since the JSP 1.1 specification, JSP supports the use of custom tags in JSP. The wide use of custom tags has resulted in repeated definitions by programmers, this has led to the birth of jstl (JavaServer Pages standard tag library.Jstl is
JAVA. AWT. font, JAVA. AWT. graphics, JAVA. AWT. image. bufferedimage, javax. imageIO. imageIO, JAVA. util. random "%> // generate a random color. color getrandcolor (random, int FC, int BC) { If (FC> 255) fc = 255; If (BC> 255) BC = 255;
A confusing question: What is the difference between getparameter and getattribute in JSP?
What is the difference between getparameter and getattribute in JSP?-- To be honest, I was confused for a long time and I knew how to use it. But I was
Specifically, the showgoods. jsp page reads
Data
Library Content, now when the first time you enter this page, there is no data, only after clicking the "query" button to pass
Html
: Form Action = "/showgoods" onsubmit = "oncheck
Equivalent
But there is a difference. If you put the introduction of all class packages in a JSP,
Include the JSP in other JSPs. In this case, the introduced class must adopt This statement.
This method can only be used on the same JSP page
The publishing process of a Web application
1. Deploy HTML files
Add the index.htm file to the helloappdirectory.
2. Deploy JSP
Common JSP files, under the helloapp directory.
3. Deploy Servlet
(1) create a Servlet File. It can call the
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