![](https://img.laitimes.com/img/9ZDMuAjOiMmIsIjOiQnIsIyZuBnLzQGMkNTMjNGZycTNyYGOlVTNwYTNiJWM3MDZxMDN3gzM0EmZjJjMl9CXt92Yu4GZjlGbh5SZslmZxl3Lc9CX6MHc0RHaiojIsJye.png)
歡迎你閱讀本書,其内容涵蓋了servlet 3.0和jsp 2.2方面的技術。
java servlet技術,或簡稱servlet,是java中用于開發web應用程式的基本技術。sun公司于1996年釋出了java servlet技術,與cgi(common gateway interface,公共網關接口)形成競争。之後,它成為在web中生成動态内容的标準。cgi的主要問題在于,它為每一個http請求都建立一個新的程序。因為建立程序需要花費大量的cpu周期,這使得編寫可擴充的cgi程式變得極為困難。另一方面,servlet程式也比cgi程式運作得更快,這是因為servlet執行完它的第一個請求之後,就會駐留在記憶體中,等待後續的請求。
自從servlet面世以來,也開發出了許多基于java的web架構,以幫助程式員更迅速地編寫web應用程式。這些架構可以使我們隻關注業務邏輯,而不在編寫樣闆代碼(boilerplate code)上花費太多的時間。但你還是需要了解servlet的基本知識。後來,javaserver pages(jsp)釋出了,這使得編寫servlet變得更加輕松了。或許你正在使用一種很好的架構,如struts 2、spring mvc,或者javaserver faces。但是,如果沒有充分了解servlet和jsp方面的知識,你将無法進行高效的編碼。順便說一下,servlets是指在servlet容器中運作的java類。servlet容器或者servlet引擎,就像是一個web伺服器,但它能夠生成動态的内容,而不隻是提供靜态的資源。
前 言
<a href="https://yq.aliyun.com/articles/176916">第1章 servlet</a>
<a href="https://yq.aliyun.com/articles/176916">1.1 servlet api概述</a>
<a href="https://yq.aliyun.com/articles/176919">1.2 servlet</a>
<a href="https://yq.aliyun.com/articles/176932">1.3 編寫基礎的servlet應用程式</a>
<a href="https://yq.aliyun.com/articles/176939">1.4 servletrequest</a>
<a href="https://yq.aliyun.com/articles/176941">1.5 servletresponse</a>
<a href="https://yq.aliyun.com/articles/176955">1.6 servletconfig</a>
<a href="https://yq.aliyun.com/articles/176957">1.7 servletcontext</a>
<a href="https://yq.aliyun.com/articles/176966">1.8 genericservlet</a>
<a href="https://yq.aliyun.com/articles/176982">1.9 http servlet</a>
<a href="https://yq.aliyun.com/articles/176994">1.10 處理html表單</a>
<a href="https://yq.aliyun.com/articles/176999">1.11 使用部署描述符</a>
<a href="https://yq.aliyun.com/articles/177004">1.12 小結</a>
<a href="https://yq.aliyun.com/articles/177012">第2章 session管理</a>
<a href="https://yq.aliyun.com/articles/177012">2.1 網址重寫</a>
<a href="https://yq.aliyun.com/articles/177018">2.2 隐藏域</a>
<a href="https://yq.aliyun.com/articles/177040">2.3 cookie</a>
<a href="https://yq.aliyun.com/articles/177055">2.4 httpsession對象</a>
<a href="https://yq.aliyun.com/articles/177059">2.5 小結</a>
<a href="https://yq.aliyun.com/articles/177061">第3章 jsp</a>
<a href="https://yq.aliyun.com/articles/177070">3.1 jsp概述</a>
<a href="https://yq.aliyun.com/articles/177080">3.2 備注</a>
<a href="https://yq.aliyun.com/articles/177086">3.3 隐式對象</a>
<a href="https://yq.aliyun.com/articles/177091">3.4 指令</a>
<a href="https://yq.aliyun.com/articles/177098">3.5 腳本元素</a>
<a href="https://yq.aliyun.com/articles/177105">3.6 動作</a>
<a href="https://yq.aliyun.com/articles/177129">3.7 小結</a>
第4章 el
4.1 el文法
4.2 通路javabean
4.3 el隐式對象
4.4 使用其他el運算符
4.5 使用el
4.6 在jsp 2.0及更高版本中配置el
4.7 小結