下载此文档

jsp简答题(JSP simple answer).doc


文档分类:IT计算机 | 页数:约12页 举报非法文档有奖
1/12
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/12 下载此文档
文档列表 文档介绍
jsp简答题(JSP simple answer)
First, the working principle of Jsp
When a JSP file is requested for the first time, the JSP engine (itself is also a Servlet) first converts the JSP file into a Java source file. In the conversion process if it is found that the JSP file has a syntax error, the conversion process will break, and the output error information to the server and the client; if the conversion is essful, the JSP engine with javac the Java source piled into the file and file is loaded into memory.
Next, create an instance of the Servlet and execute the jspInit () method of the instance (the jspInit () method is only executed once in the life cycle of Servlet).
Then you create and start a new thread, and the new thread calls the jspService () method of the instance. (for each request, the JSP engine creates a new thread to process the request. If multiple clients request the JSP file at the same time, the JSP engine creates multiple threads, each requesting a thread corresponding to it.
In the browser called JSP file, the Servlet container will take the browser request and response to the browser package HttpServletRequest and HttpServletResponse objects, and call the corresponding Servlet instance (jspService) method, the two object is passed as a parameter to the jspService () method.
After the jspService () method executes, the HTML content is
returned to the client.
If the JSP file is modified, the server will decide whether to pile the file according to the settings. If you need to pile, compile the result instead of the Servlet in memory and continue the process. If at any time, due to insufficient system resources, the JSP engine will remove Servlet from memory in some uncertain way. When this happens, the jspDestroy () method is called first, and then the Servlet instance is tagged into garbage collection.
Two, include grammatical elements analysis
instruction
Include can insert JSP code before the JSP pa

jsp简答题(JSP simple answer) 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数12
  • 收藏数0 收藏
  • 顶次数0
  • 上传人rjmy2261
  • 文件大小24 KB
  • 时间2017-11-18
最近更新