jsp框架java语言_[java]java语言初探 servlet+jsp架构

<

>

ae18a70eb6913d31431373a206f09468.png

1f19b338e1da71ab34d70c8e2353d197.png

1602a0ef20e11c18ab49154eecfd0e6c.png

6ce3195abceef43fd4b34f0a92ea5b4a.png

879f10498f090bb80245bd6ea41dd721.png

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

660a7e63ae455f4c9f0d1c61fa501593.png

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:

21f387d0ce8679ee52936ed21c2c8df8.png

jsp入门:

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值