Who said that the Servlet compilation must inherit from the HttpServlet class and must implement doGet) or doPost). Isn't it possible to implement the Servlet interface?
In fact, there are three main methods to compile Servlet: one is to implement
The emergence of AJAX as a Web application model has greatly changed the appearance of the server. The typical Web usage mode of the user entering a form on the Web page and clicking the submit button to go to the next link is now transforming to a
Call Servlet to process requests
1. The element and its child elements declare a Servlet.
*: specify a text description for the Servlet.
*: provides a brief name for the Servlet to be displayed by some tools.
*: specify an icon for the Servlet
Development environment required for compiling Servlet
The basic environment required for Servlet development is JSDK and a Web server supporting Servlet.
1. JSDK (Java Servlet Development Kit)
The JSDK contains the Java class libraries and related
Some new functions have been added to the latest Servlet version 2.4 of J2EE1.4. The following describes the main common functions.
1. XML Schema definition Web query deployment description file
In versions earlier than Servlet 2.3, DTD is used as
A set of Web components such as Servlets, JSP, and JavaBean installed on a server with a specific URL namespace such as/myapplication constitute a Web application, every Web application is the same JVM), the container will have a background object,
The following code shows the basic structure of a simple Servlet. The Servlet processes GET requests. If you are not familiar with HTTP, it can be viewed as a request sent by the browser when a user enters a URL in the browser address bar, clicks a
Read Request headers in Servlet
It is very convenient for the Servlet to read the HTTP header. You only need to call the getHeader method of HttpServletRequest. If the specified header information is provided in the customer request, getHeader
From the early stages of the network, people hope that their network servers will not only display static documents, but also the general Gateway Interface (CGI) expands the server capabilities, however, the cost is that additional processing
Install your Servlet and JSP page
Compile your Servlets and you need to set CALSSPATH. For example, if you use JRun and JDK1.3 in windows, you can open a command line and execute the following command:C: \ set CALSSPATH = C :\\ lib \ ext \ servlet.
In the JSF application, a Servlet is configured in web. xml, called javax. faces. webapp. FacesServlet. You can see that the process of viewing and understanding a request can start from here. Download the source code of JSF from the official
This article introduces the JSP and JavaBean models. Many people may not know about the JSP and JavaBean models. It does not matter. After reading this article, you will certainly have a lot of GAINS. I hope this article will teach you more.
Web
[3. Function Control pop-up window]The following is a complete code: 〉 〉 〉 〉 ()"〉... Any page content... 〉 〉A function openwin () is defined here, and the function content is to open a window. There is no purpose before calling it.How to call it?
Once you define this class, compile it and place it in the class path of the network server. This server also needs to define a special directory to place bean classes. If you are using Blazix, you can place them in the "classes" directory. If you
Iis web is favored by many people because of its simple management and support for ASP. This section describes how to use resin to enable IIS to support jsp and servlet.1. install and configure iis and resin1.1 separately so that both of them can
Servlet and filter are common technologies used in J2EE development. They are easy to use and easy to configure.
It is estimated that most of my friends are directly configured and used without having to worry about specific details. I encountered a
1. Java Servlet and Its Features
Servlet is the answer of Java technology to CGI programming. Servlet programs run on the server to dynamically generate Web pages. Compared with traditional CGI and many other CGI-like technologies, Java Servlet is
The filter can add some additional operations before the request arrives at the JSP or Servlet or before the response is returned to the client. If multiple JSP pages and servlets need to perform the same or similar operation, we can extract the
The Web Application Server generates various events, such as Web Container startup events, session expiration events, and request arrival events. We have already elaborated on the interfaces of these events in JBuilder 2005 actual JSP development.
The relationship between Servlet and Applet is generally indirect, that is, the page request is sent to the Servlet by the browser. As a response, the Servlet sends the HTML document generated by the result to the browser. In many cases, it is
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