When we used the El expression yesterday, the El expression could not get the value in the Variable. After checking the information, we can see that it is related to the servlet/jsp version, el expressions can be used only in servlet 2.4/jsp 2.0. In
In struts2 actions, the request object, Session object, and application object cannot be directly used, because it does not want the struts1 action, and the execute parameter in it contains the above object, so what should we do when we need to load
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
I checked the information about the problem online:
The solution provided on the Internet is as follows:
1. This error occurs during struts running. The solution is to copy java_home/lib/tools. jar to atat_home/common/lib. (I DID NOT delete the
3. edit a JSP instance
Content in the previous section (Environment Settings): graphic use of eclipse3 + lomboz3 + Tomcat to develop JSP -- 1. Environment 1. Create a lomboz J2EE project ". Enter "jspsample" in "project name", click "Next", and
Common jsp q &
1. How to mix JSP and SSI # include?In JSP, you can use the following method to include pure HTML:However, if data. inc contains JSP code, we can use:
2. How to execute a thread-safe JSP?Add the following command:
3. How does JSP
The encoding method is as follows:Pageencoding = "UTF-8", contenttype = "text/html; charset = UTF-8", request. setcharacterencoding ("UTF-8"), response. setcharacterencoding ("UTF-8 ")
1. pageencoding = "UTF-8" is used to set the encoding used when
1. How to mix JSP and SSI # include?
In JSP, you can use the following method to include pure HTML:
However, if data. inc contains JSP code, we can use:
2. How to execute a thread-safe JSP?Add the following command:
3. How does JSP process data
The redirection Technology of JSP/servlet is summarized as follows:
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,
The requirement source is as follows: Upload a large Excel file to the server. The server parses the Excel file and inserts it into the database one by one. The whole process takes a long time, therefore, after you Click Upload, You need to display
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 =
First, save the user name on the login interface. Here, I submit the user name to the servlet and then save it,
// Obtain the USER parameter string uname = request from the logon interface. getparameter ("username"); Request. getsession ().
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
Definition: member variables that can be used in JSP page scripts (Java program slices and Java expressions) without declaration
JSP has nine basic built-in components (which correspond to the six internal components of ASP): request, response,
The application object represents the web application, so the application is used to operate web application-related data. The Application Object usually has the following two functions:
1. Data is shared among servlets across multiple JSP pages of
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