servers, if it doesn't support a servlet, adding that part is often free (or requires very little investment).
JSP and its characteristics
JavaServer Pages (JSP) is a common static HTML and Dynamic HTML hybrid coding technology, for the description of JSP basic concepts See "JSP
First, the conceptServletServlet ( Server applet is the Java Servlet Java a server-side program written to interactively browse and modify data to generate dynamic Web servlet means java language implementation of an interface, the generalized servlet Servlet The class of the interface, in general, people will
Is your J2EE application running slowly? Can they withstand rising traffic volumes? This article describes how to develop high-performance and highly elastic Servlet and JSP page performance optimization technologies. It means to build as fast as possible and adapt to the increasing number of users and their requests. In this article, I will lead you to learn the proven performance Adjustment Technology, wh
, this feature is often free (or requires a very small investment ).
JSP and Its Features
JavaServer Pages (JSP) is a technology that implements common static HTML and dynamic HTML hybrid encoding. For details about the basic concepts of JSP, see JSP technology introduction.
Most pages generated by CGI programs are sti
1. relative and absolute paths in JSP and Servlet
Premise: assume that your Http address is http: // 192.168.0.1/your web application is test, path = "/test", then your web application URL is http: // 192.168.0.1/test/
Directory structure of web applications:Test/web/
Css/Js/
Test. js
Web-inf/Classes/Lib/User/A. jspB. jspImages/Web. xml. For example:/image/a.gif,/user/main.
This article describes some of the most useful ways to adjust the JSP and servlet to make your servlet and JSP pages respond faster and more scalable. And in the case of increasing the number of users, the system load will show a trend of smooth and long. In this article, I'll use some examples and configuration method
Answer one:
First you have to figure out what a servlet,servlet is a Java program that executes on the server side, except that it has a set of rules (what we normally call APIs); The JSP is simply a servlet program written in another set of simple rules that can write Java code, You can also write HTML code, JAVASCR
When interviewing a Java programmer, you are often asked about the knowledge in the JSP servlet. This knowledge is the basis of the JSP servlet, this article mainly comb the JSP servlet comparison base but more important knowledge
1.jsp is compiled into a servlet. (JSP is the essence of SERVLET,JVM can only identify Java classes, not recognize the JSP code, the Web container to the JSP code into the Java class can be recognized)
The 2.
, this feature is often free (or requires a very small investment ).
JSP and Its Features
JavaServer Pages (JSP) is a technology that implements common static html and dynamic HTML hybrid encoding. For details about the basic concepts of JSP, see JSP technology introduction.
Most pages generated by CGI programs are sti
Js|servlet| Program | optimization
Is your Java application running very slowly? Can they afford to keep up with the rising traffic? This article describes the development of high-performance, highly resilient JSP pages and the performance optimization of the servlet technology. The idea is to build as fast as possible and adapt to a growing number of users and t
/CallThere is a request to reach the container, and the container invokes the Servlet object's service () method.The service () method of HttpServlet calls the Doget () or Dopost () method according to the requested method. However, these two do methods, by default, throw an exception and require subclasses to override.Phase IV: destructionThe container removes the Servlet objects that are no longer needed,
Is your J2EE application running slowly? Can they withstand rising traffic volumes? This article describes how to develop high-performance and highly elastic JSP pages and Servlet performance optimization technologies. It means to build as fast as possible and adapt to the increasing number of users and their requests. In this article, I will lead you to learn the proven performance Adjustment Technology, w
1. What are the built-in JSP objects?
A: JSP has nine built-in objects:
Request: User-side request, which contains parameters from the get/POST request
Response: response from the webpage to the client
Pagecontext: Manage webpage attributes
Session: the session period related to the request.
Application: servlet content being executed
Out: used to send response o
1.JSP, relative and absolute paths in the servlet
Premise: Suppose your HTTP address is HTTP://192.168.0.1/your Web application for test,path= "/test" then your Web application URL is http://192.168.0.1/test/
If the Jsp,js file is not accessible at all in the Web-inf directory, JSP if placed in the Web-inf directory ca
called when the Web container shuts down or detects that a servlet is being removed from the container, so that the instance frees up the resources it consumes.4: UninstallWhen a servlet finishes calling the Destroy () method, the secondary instance waits to be reclaimed by the garbage collector, and the init () method initialization is called again if the servlet
What is a Web container
Web container (Container) is the only HTTP server recognized by servlet/jsp
At a specific level, the container is basically a program written in Java, running on the JVM, different types of containers will be responsible for different work, if the servlet/jsp Run Web cont
/CallThere is a request to reach the container, and the container invokes the Servlet object's service () method.The service () method of HttpServlet calls the Doget () or Dopost () method according to the requested method. However, these two do methods, by default, throw an exception and require subclasses to override.Phase IV: destructionThe container removes the Servlet objects that are no longer needed,
For many years do not engage in Java Web Development, these days is the national Day holiday, relaxation is also interested in looking back to Java Web Development Technology Foundation.As we all know, servlet is an important foundation of Java Web development, but because of the relatively cumbersome servlet development, the code is large and difficult to maintain, art can not participate in the interface
First, let's talk about the functions of several encodings in JSP and Servlet.
In JSP and Servlet mainly have the following areas can be set encoding, pageEncoding = "UTF-8", contentType = "text/html; charset = UTF-8", request. setCharacterEncoding ("UTF-8") and response. setCharacterEncoding ("UTF-8"), where the first
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.