1. Introduction to built-in objects
JSP built-in objects are very important in JSP. These built-in objects are created by WEB containers, so you do not need to create them yourself.
The main built-in objects include:
(1) request: javax. servlet.
File Download-SpringMVC test, File Download-springmvc
You can directly modify the file path, and do not need to modify other files. The help class has been written for you and can be used directly.
1. Scroller:
/*** Download file ** @ author
Recently, when I changed the page, I saw response in the page. setheader ("Pragma", "No-Cache"); this statement does not know what it is. After investigation, it is found that the browser cache is disabled. Now, HTML, ASP, in PHP and jsp4 languages,
Definition:
Do not use the session scope just to pass the variable to the next page. It will increase the scope of the variable without reason. Forwarding may help you solve this problem.
Redirection: all variables stored in previous requests are
Java tip 94: How to Use servlet to open documents in non-HTML Format A Simple Method for sending non-HTML documents to a Web Client By Marla Bonar
SummaryJava Servlet programming can easily send HTML files to the client web
1. requestdispatcher. Forward ()When forward () is used on the server, 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. JSP uses
Brief description of HTTP Header
1. Http return status code
In HTTP, the status code returned by the server is defined as follows:
1xx: informational. For example, the server requires authentication.
2XX: success. For example, 200 indicates that the
Document directory
1. Common Methods:
2. Cookie control:
1. built-in object introduction built-in objects cannot be found in Used in!
Built-in object
Class
Pagecontext
Javax. servlet. jsp. pagecontext
Request
Document directory
1.1 request line
1.2 Request Header
2.1 response line
2.2 Response Header
A series of processes after the URL is entered in the browser:
The following figure summarizes several conclusions:
1. If the DNS server is
In CMS, BBS, and other systems, there will be post module, and the article will contain attachments and images. When you click an attachment, the SAVE dialog box may appear and the browser will open it directly, for example, the connection
After a long time, I forgot the basics. Let's take a look at it today. Hehah... learn new things with a warm understanding !!!
1. RequestDispatcher. forward ()-forwardIs used on the server. When forward () is used, the Servlet engine transmits the
Because response is an implicit object in the jsp page, you can use response. sendRedirect () in the jsp page to directly implement relocation.Note:(1) When response. sendRedirect is used, no HTML output is available.This is not absolute. The
1. How to mix Jsp and SSI # include?In JSP, you can use the following method to include pure HTML:& Lt! -- # Include file = "data. inc" -- & gtHowever, if data. inc contains jsp code, we can use:& Lt % @ include file = "data. inc" % & gt
2. How to
Try to generate an excel file directly from the web page. Although it is not directly from SQL to excel, it is more convenient and user-friendly ..
I found a lot of information on the Internet and found a piece of javascript function implementation
How to use the http protocol to publish blog post comments ,. How to use the http protocol to publish a blog post comment is to introduce the implementation principle: the essence of submitting a comment to a blog post is to send a post request
JSP details -- response objectResponse object
The response object is used to respond to client requests and output information to the customer. It encapsulates the responses generated by JSP and sends them to the client to respond to client requests.
PHP design mode--responsibility chain mode
The responsibility chain model (also called the Chain of Responsibility model) contains a number of command objects and some processing objects, each processing object determines that it can handle
Call
$. Getjson ("$ {CTX }/Getdata. Action", {Topid: topid}, function (JSON ){
// Use the returned Data Update page
}
The page is cached, that is, the data remains unchanged after the user logs on.
I thought it was a JPA cache.
Based on the Servlet summary in the javaWeb stage, the servlet in the javaweb stage
1. Servlet OverviewServlet is a server program written in Java. It uses the request-response mode to provide Web services and supports standard ServletAPI. Servlet
How to export excel using nodejs
This document describes how to export an excel file from nodejs. Share it with you for your reference. The details are as follows:
Nodejs generates and downloads excel files for query data. The excel-export plug-in
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.