Servlet| programming
I. Overview
A servlet is a platform-and protocol-independent, server-side Java application that generates dynamic Web pages.
A servlet is a server-side Java application located inside a Web server, unlike a
How much do you know about the servlet technology of Java Web programming?
1, the Servlet FoundationFor servlet technology development, Sun offers a number of column interfaces and classes, The most important of these is the Javax.servlet.Servlet interface, where two import
|--- You can get the name of the servlet to get the ServletConfig object: This.getservletconfig (); |---can get the common API for ServletContext object servletconfig: |--public String getservletname (); Used to get the servlet name |--public string getinitparameter (string name); Used to get the value specified in Init-parent |--public enumeration Getinitparameter (String name); Used to get all the
I. Basic servlet APIJava EE APIs for servlet mainly include javax. servlet and javax. servlet. HTTP. The former provides basic Servlet classes and interfaces that can be used by web containers, and the latter mainly includes Servlet
A Cookie is a small piece of data that can be embedded in HTTP requests and responses. It is generated on the server and is returned as part of the response header domain. After the browser receives a response containing the Cookie, it will write the Cookie content into a client text file specially designed to store the Cookie in the form of a "keyword/value" pair. The browser sends the Cookie and subsequent requests to the same server. The server can read the Cookie again and set the Cookie's v
This article describes the software and environment configuration required for Java servlet programming. As long as you have a PC with Windows 95/98 installed, you can follow the steps in this article to develop a servlet program. This article also gives the method and routines for writing and reading cookies to the us
The basic environment required for Servlet development is JSDK and a Web server supporting Servlet.
Development environment required for compiling Servlet
The basic environment required for Servlet development is JSDK and a Web server supporting Servlet.
1. JSDK (
* @param cfg Servlet configuration information
*/
public void init (servletconfig cfg)
throws Servletexception
{
Super.init (CFG);
}
/**
* * is unloaded.
*/
public void Destroy ()
{
Super.destroy ();
}
}
Note: Cookies are two-way communication between the server side and the client, so it involves security issues.
Session management Using the Java
Reference book: "Java EE open source programming Essentials 15"A servlet is a Java class that can handle an HTTP request from a client and return a response, executed by a server-side call, with some specification written.For example: 1 Packagetest;2 3 Importjava.io.IOException;4 ImportJava.io.PrintWriter;5 6 Import
The development environment required to write a servlet
The basic environment required for servlet development is JSDK and a Web server that supports the servlet.
1.JSDK (Java Servlet Development Kit)
JSDK contains the Java cla
I. Overview
A servlet is a platform-and protocol-independent, server-side Java application that generates dynamic Web pages.
A servlet is a server-side Java application located inside a Web server, unlike a traditional Java application that starts from the command line, wh
The development environment required to write a servlet
The basic environment required for servlet development is JSDK and a Web server that supports the servlet.
1.JSDK (Java Servlet Development Kit)
JSDK contains the
I. Overview
A servlet is a platform-and protocol-independent, server-side Java application that generates dynamic Web pages.
A servlet is a server-side Java application located inside a Web server, unlike a traditional Java application that starts from the command line, wh
A Cookie is a small piece of data that can be embedded in an HTTP request and response and is generated on the server and returned to the user as part of the response header domain. When the browser receives a response that contains a cookie, it writes the contents of the cookie as a "keyword/value" pair to a client-specific text file that stores cookies. The browser sends the cookie and subsequent requests to the same server, and the server can read the cookie again in a valid period setting, a
Introduction to the servlet filterThe servlet filter is actually a standard Java class that gets the function of the filter by implementing the Filters interface. It is loaded by the system through the Web.xml configuration file when the JSP container is started.The servlet filter is invoked when a user request is rece
A Cookie is a small piece of data that can be embedded in an HTTP request and response and is generated on the server and returned to the user as part of the response header domain. When the browser receives a response that contains a cookie, it writes the contents of the cookie as a "keyword/value" pair to a client-specific text file that stores cookies. The browser sends the cookie and subsequent requests to the same server, and the server can read the cookie again in a valid period setting, a
HttpServlet is inherited from Genericservlet, so it has genericservlet similar methods and objects, a package that we use with servlet programming, which supports methods such as post and get of HTTP.
Programming Idea: The following example, the operation result is the output simply returns the request line and the header information which the customer sends to t
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.