The JSP standard template library (jstl) is a new component developed for JSP by Sun. Jstl allows you to use tags for JSP page development, instead of using most JSP
Program Scriptlet
Code Development. Jstl can do almost anything that traditional
Solution:
Using notepad or something in WindowsProgramWhen you save a text file as a UTF-8, notepad adds several invisible characters (ef bb bf) before the file header, known as BOM (byte order mark ).In other wordsSource codeCopy to TXT and save
Xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"Xsi: schemalocation = "http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"Version = "2.4"> how-to on JSP configuration JSP configuration Property Group for common configuration for all the JSP's
I saw a post today and asked questions about application/pdf. I tried it by myself.
The details are given belowCode
Add mime information to the Web. xml of the project (you can manually change it to another format, such as word)
pdf
The out object is encapsulated as the javax. servlet. jsp. jspwriter interface. You can obtain the out object by calling the pagecontext. getout () method.
1.Public abstract void clear ()Clear the content in the buffer and do not send data to
Too depressing. A new Tomcat 6.0.20 is installed, and a 404 exception is found in it.ProgramIt cannot always run.CodeI copied it from another code in use. The Code is as follows:
"/>
Of course, the key in it can be used normally.
So
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)
There are four types of elements in the server. xml file.
1. Top-level class Elements
Including and , which are located at the top layer of the configuration file.
2. connector Elements
It represents a communication interface between the
Tomcat directory structure
Note: The lib directory stores jar files, where:
Server/lib: jar files in the directory can only be accessed by the Tomcat server
Shared/lib: accessible to all web applications
Common/lib: accessible to Tomcat
The basic principles of JSP technology's Application in WAP:
1. WML labels and statements can be directly written in JSPProgram.
2. If you want to use JSP to process WML labels and statements, you need to use "". The format is:
... (WML
Summary:
(1) If you use form to submit data, the submitted data will be processed on another JSP page. You can also use Ajax for partial updates without redirecting.
(2) When data verification is required before a form is submitted, the onsubmit
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
1. First, let's see how to get the current time and display the Code:
------------------------------------------------
Java. Text. simpledateformat formatter = new java. Text. simpledateformat ("yyyy-mm-dd hh: mm: SS ");
Java. util. Date
HTML comment
Display a comment on the client.
JSP syntax
] -->
Example 1
Generate the same data as the above in the HTML source code of the client:
Example 2
-->
In the HTML source code of the client, it is displayed:
Description
This annotation
: redirects an HTML file, JSP file, or program segment.
JSP syntax"}/>Or"}>}"/> +
Example
Description the tag transmits a request object containing user requests from one JSP file to another.
the code below the tag cannot be executed.
You can
JSP generates image Verification Code 1. Create a JSP page (image. jsp) and copy all the following code to image. jsp.
Color getrandcolor (int fc, int BC)... {// obtain the random color in the specified range.
Random random = new random ();
If (FC>
Generates four random numbers and pictures with messy backgrounds. The numbers and background colors change,
ServerEnd refresh (using history. Go (-1) will also change)
Prototype reference Alibaba http://china.alibaba.com/member/showimage
File that
A common method for uploading files (in fact, not only uploading files, but all form submissions are acceptable) is to define a hidden iframe with a width and a height of 0 on the current page, then point the address submitted by form to this IFRAME,
Recently, I am writing code for online video playback. I have found some information from the Internet for your reference. I have changed the video path to the following code:
1. AVI formatThe code snippet is as follows:Src = "mbar. Avi">
2. mpg
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