zoukankan      html  css  js  c++  java
  • [java]java语言初探 servlet+jsp架构

    <<head first java>>

    https://www.tutorialspoint.com/jsp/jsp_architecture.htm

    JSP Processing:

    The following steps explain how the web server creates the web page using JSP:

    • As with a normal page, your browser sends an HTTP request to the web server.

    • The web server recognizes that the HTTP request is for a JSP page and forwards it to a JSP engine. This is done by using the URL or JSP page which ends with .jsp instead of .html.

    • The JSP engine loads the JSP page from disk and converts it into a servlet content. This conversion is very simple in which all template text is converted to println( ) statements and all JSP elements are converted to Java code that implements the corresponding dynamic behavior of the page.

    • The JSP engine compiles the servlet into an executable class and forwards the original request to a servlet engine.

    • A part of the web server called the servlet engine loads the Servlet class and executes it. During execution, the servlet produces an output in HTML format, which the servlet engine passes to the web server inside an HTTP response.

    • The web server forwards the HTTP response to your browser in terms of static HTML content.

    • Finally web browser handles the dynamically generated HTML page inside the HTTP response exactly as if it were a static page.

    All the above mentioned steps can be shown below in the following diagram:

    jsp入门:

    http://www.runoob.com/jsp/jsp-intro.html

  • 相关阅读:
    I/O多路复用一些概念
    事件驱动模型
    协程-遇到I/O自动切换
    进程间共享数据Manager
    协程
    进程池
    Linux rpm 命令参数使用详解[介绍和应用]
    linux 增加用户 useradd 用法小结及配置文件说明
    java classpath批量设置shell脚本
    bat批处理设置Java JDK系统环境变量文件
  • 原文地址:https://www.cnblogs.com/iiiiher/p/5886594.html
Copyright © 2011-2022 走看看