I went to the interview the day before yesterday and met a technical interviewer. I asked a lot of questions and did not answer them. Instead, I did not understand them well enough and did not summarize them. The most typical is the hierarchy of
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.
Java Web file download 1-File Download implementation and garbled Processing
File upload and download are common problems in web development. In the past few days, I have used file downloads for a project. I have also separated some notes and made
Servlet solves web page cache Problems
(1) Why should we prevent the page caching problem of the browser:
Therefore, pages that do not need to be cached must be non-cached;
The Code is as follows:
Package com. lc. httpTest; import java. io.
JAVAEE -------- Filter set whether to cache (Filter)
On a webpage, some requests are not required for each client to access the server, such as images and videos. This increases the workload of the server. To prevent this, we use a filter to set
Question about the Chinese Character Set in Servlet response, servlet Chinese Character Set
When using response in Servlet to output Chinese characters to the client browser, garbled characters may occur. The following is a summary:
There are two
Browser Cache Insider and solution
In the following three different scenarios, browsers have different caching conditions:
1). The servlet does not overwrite the Getlastmodified method, there is no LastModified header field in the response message,
Filters that enable browsers not to cache pages
Import javax.servlet.*;Import Javax.servlet.http.HttpServletResponse;Import java.io.IOException;
/*** Filters used to make Browser not cache the page*/public class Forcenocachefilter implements Filter {
Filters that enable browsers not to cache pages
Import javax.servlet.*;Import Javax.servlet.http.HttpServletResponse;Import java.io.IOException;
/*** Filters used to make Browser not cache the page*/public class Forcenocachefilter implements Filter {
I. Preparation
1. Find the webapps directory under the tomcat decompression file directory and create the TestAjax folder.
2. Create a project that can run according to tomcat to create a level folder
3. Create the following jsp file in the RWQAjax
Servlet, Filter, Listener summary, servletlistener
The servlet specification provides a set of standard servlet APIs. Servlet containers are the implementation of servlet specifications.
1. In Action
(1) Write a class to inherit HttpServlet;
(2)
1,Copy codeThe Code is as follows: JS is used to generate a "Forward" action to offset the Backward function. This method should be the most concise, and you do not need to consider the situation of two or multiple "backward" connections, the
Json is used for data interaction in the front and back of the project this time. After this time, I will take a rough look and briefly summarize json.JSON: JavaScript Object Notation (JavaScript Object Notation ).JSON is the syntax for storing and
Java Web Summary (IV), Java Web Summary
Use Servlet to send Server Response Information
The Servlet API defines a special interface class javax. servlet. http. HttpServletResponse to create an HTTP response, including the HTTP status line, response
The role and usage of Content-Disposition in the header. Content-disposition is an extension of the MIME protocol. The MIME protocol instructs the MIME user agent how to display additional files. Content-disposition can actually control the Content
I. preface the original author of this article is TonyWang. This article involves file read/write and automatic jpg image generation. Using jsp + servlet technology, jsp calls servlet to generate images. II. the first file index. jsp is as follows: %
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.