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
(1) Out object
An out object represents a page output stream, which is usually used to output variable values and Constants on the page. Generally, the out object can be used in the output expression to achieve the same effect.
In servlet:
Copyright Disclaimer: During reprinting, please use hyperlinks to indicate the original source and author information of the article and this statementHttp://b0r0j0.blogbus.com/logs/2186437.html
[Abstract] The purpose of this article is to greatly
Restrict repeated submission of forms on the JSP clientThere are two ways to restrict the repeated submission of forms on the client:First, set a flag variable in a Javascript script to identify whether the form has been submitted. If yes, a dialog
Encoding settings in JSP:
1. pageencoding:
JSP page code: Code of the JSP file
2. contenttype:
Code displayed on the web page: the code displayed in the browser for the JSP output stream
3. html page charset:
Web page input encoding: font
JSP's support for file uploading is not as good as PHP's support. It is directly implemented as a function, not as it can be implemented through components in ASP. JSPs can be implemented through JavaBean. However, there is no need to write an
In JSP, the detailed text of the word is printed. response. setcontenttype ("application/MSWord") is referenced in JSP. The opened page is the word style.
1. Achieve word horizontal typing:
Use to implement
2. Create custom vertical la s
@
Nine built-in objects and functions:
1. Request object: the client's request information is encapsulated in the request object, which can be used to understand the customer's requirements and then respond.2. Response object: The response object
Technology: struts1 + JSP + msql
Requirement: The ncmgt network monitoring system displays the user's operation logs, and queries the user's detailed operation records based on the operation time. The time is accurate to seconds.
The general effect
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 JSP compilation command notifies the JSP engine of the message and does not generate the output directly. Compiling commands have default values, so developers do not need to assign values to each command. Its basic syntax is:
(1) page: this
The Config object indicates the current JSP configuration information, but the JSP page usually does not need to be configured, so there is no configuration information. This object is rarely used on JSP pages, but the user is large in servlet,
Each request object encapsulates a user request and all request parameters are encapsulated in the request object. Therefore, the request object is an important way to obtain request parameters.
1. Get Request Parameters and request headers
A Web
The Session object represents a user session. The meaning of a user session is that a session starts when the client browser connects to the server and is disconnected from the server.
A session is usually used to track the user's session
Servlet-based Ajax
This is a common UI. When you select Zhejiang in the first selection box, Zhejiang city appears in the second selection box. When you select Jiangsu in the first selection box, the second option box shows the city 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.