[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

 

转载于:https://www.cnblogs.com/iiiiher/p/5886594.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值