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"); /
There are two matching methods for filters in JSP, and there must be one matching method for the write filter. One is in the form of , the other is in the form of , the second is to specify the servlet to be filtered, that is, exact matching, and
This time, we made a simple registration page and used flex to communicate with JSP. According to the 4 practice, flex can use RPC to return XML Information output by JSP.
Make a registration page:
Including name, password, gender, age, and
1. requestdispatcher. Forward ()
Is used on the server. When forward () is used, the servlet engine transmits the HTTP request from the current servlet or JSP to another servlet, JSP or common HTML file, that is, your form is submitted to. JSP, in.
1. Jump to and pass the parameter by responding to the onclick method, and use reque. getparameter ("user") on another page to get the value of this parameter.Onclick = "location. Replace ('userprivate. jsp? User = ')"Here, RS is the return value
I used to upload a single image and want to upload multiple images at a time ~~
Document files.:
Package { Import flash. display. sprite; Import flash. events. event; Import flash. events. mouseevent; Import flash.net. filefilter; public class
In JSP, include has two forms:(Note: Like other JSP elements, the include behavior element ends with "/" when there is no behavior body, just like the following." flush = "true"/>)
The following are the differences between the two include
Put. jsp
application test
Get. jsp
application test
Refresh put in different browser processes. JSP page, no matter in which browser process access get. the JSP page must get a consistent value, because the counter
Anyone who has experience in Java Web development knows that there are a variety of data interactions between JSP and Servlet, but the most common one is form submission (I am not wrong here -,-), use the action of the form tag in JSP to specify the
1.1 Application
* Obtain the application object in JSP.
For example, getservletcontext (). setattribute ("counter", new mycount. Counter ());
Example:
* Methods for processing on Application Start and on session start events in JSP
Use the
Main Content: l complete other basic functions of the shopping cart; l generate orders; l Summary 1. Other functions of the shopping cart modify the number of items in the shopping cart and delete items are two basic functions. The implementation
During web development, although the encodingfilter is added to the web. xml file encodingfilter Org. springframework. web. filter. characterencodingfilter encoding UTF-8 encodingfilter *. shtml
This allows you to use
The example is simple. The bean function is to get the current time, and its code is:Common. Java:--------------------Package xx;
Import java. util. date;Import java. Text .*;
Public class common{Date d = new date ();Public String now (string
Document directory
II. Introduction to JSP el
I. jsp El language definitionExpression Language (e l) Objective: To make JSP writing easier.
The expression language is inspired by ecmascript and XPath expressions. It provides methods to simplify
Java Server Pages (JSP) is another major technology used by the J2EE Web layer to dynamically generate Web pages. JSP technology is an extension of Servlet technology. Compared with Servlet, JSP provides a natural method for generating web pages,
I. Tomcat site deployment
How can I associate the access address with the folder where the webpage is stored locally? It is actually very simple.
For example, I put the webpage file under the D: \ website directory and want to access the webpage
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