{"id":1922,"date":"2017-02-15T19:39:39","date_gmt":"2017-02-15T11:39:39","guid":{"rendered":"https:\/\/ai.zhousir.top\/?p=1922"},"modified":"2026-08-18T12:09:37","modified_gmt":"2026-08-18T04:09:37","slug":"java%e5%b7%a5%e7%a8%8b%e5%b8%88%e9%9d%a2%e8%af%95web%e7%af%87%e4%ba%8c","status":"publish","type":"post","link":"https:\/\/ai.zhousir.top\/?p=1922","title":{"rendered":"Java\u5de5\u7a0b\u5e08\u9762\u8bd5Web\u7bc7(\u4e8c)"},"content":{"rendered":"<section id=\"wenyan\" style=\"font-family: system-ui, 'Apple Color Emoji', 'Segoe UI', 'Segoe UI Symbol', 'Noto Sans', Roboto, sans-serif; line-height: 1.75; font-size: 16px; color: #000000; caret-color: #000000;\" data-provider=\"WenYan\">\n<p style=\"margin: 1em 0px;\">Java Web \u9762\u8bd5\u5e38\u628a <strong style=\"color: #4870ac;\">JSP \/ Servlet \/ Session \/ \u8fc7\u6ee4\u5668 \/ \u76d1\u542c\u5668<\/strong> \u4e32\u6210\u4e00\u6761\u7ebf\uff1a\u6d4f\u89c8\u5668\u8bf7\u6c42\u600e\u4e48\u843d\u5230\u9875\u9762\u3001\u4e5d\u5927\u5185\u7f6e\u5bf9\u8c61\u5404\u81ea\u7ba1\u4ec0\u4e48\u3001\u8f6c\u53d1\u548c\u91cd\u5b9a\u5411\u5dee\u5728\u54ea\u3002\u4e0b\u9762\u6309\u8fd9\u6761\u7ebf\u628a\u56fe\u548c\u8981\u70b9\u644a\u5f00\uff0c<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">JavaScript<\/code> \u603b\u590d\u4e60\u53ef\u53e6\u770b <a href=\"http:\/\/www.jianshu.com\/p\/cc479554df66\" target=\"_blank\">\u8fd9\u7bc7\u603b\u7ed3<\/a>\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u8fd9\u7ec4\u7b14\u8bb0\u5bf9\u5e94\u9762\u8bd5\u300cWeb \u7bc7\u300d\uff1a\u5148\u770b\u5168\u666f\u56fe\uff0c\u518d\u9010\u5757\u5bf9\u7167\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2020\/04\/201407311445259040063.jpg\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2826\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2020\/04\/201407311445259040063.jpg\" alt=\"20140731144525904006\" width=\"383\" height=\"268\" \/><\/a><\/p>\n<h2 style=\"padding: 1px 12.5px; color: #ffffff; margin: 1.2em 0px 1em; border-radius: 4px; display: inline-block; background-color: #4870ac; font-size: 1.3em;\">\u4e00\u3001JSP \u9875\u9762\u751f\u547d\u5468\u671f<\/h2>\n<p style=\"margin: 1em 0px;\">\u7528\u6237\u8bbf\u95ee <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">index.jsp<\/code> \u65f6\uff0cTomcat \u7684 JSP \u5f15\u64ce\u5148\u5224\u65ad\u662f\u4e0d\u662f\u7b2c\u4e00\u6b21\u78b0\u5230\u8fd9\u4efd\u8d44\u6e90\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-aaf03b1350740c8a.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\/w\/1240\" alt=\"\" data-original-src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-aaf03b1350740c8a.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\" \/><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u7b2c\u4e00\u6b21\uff1aJSP \u8f6c\u6210 Servlet\uff08\u672c\u8d28\u662f Java \u7c7b\uff09\u2192 \u7f16\u8bd1\u6210\u5b57\u8282\u7801 \u2192 \u8c03 <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">jspInit<\/code> \u2192 \u518d\u8fdb <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">jspService<\/code> \u5904\u7406\u8bf7\u6c42\u3002<\/section>\n<\/li>\n<li>\n<section>\u4e0d\u662f\u7b2c\u4e00\u6b21\uff1a\u76f4\u63a5\u8d70\u5df2\u751f\u6210\u7684\u5b57\u8282\u7801\uff0c\u540c\u6837\u8fdb\u5165 <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">jspService<\/code>\u3002<\/section>\n<\/li>\n<li>\n<section><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">jspService<\/code> \u4e13\u95e8\u5904\u7406\u672c\u6b21\u8bf7\u6c42\uff1b\u9875\u9762\u9500\u6bc1\u65f6\u624d\u8f6e\u5230 <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">jspDestroy<\/code>\u3002<\/section>\n<\/li>\n<\/ul>\n<h2 style=\"padding: 1px 12.5px; color: #ffffff; margin: 1.2em 0px 1em; border-radius: 4px; display: inline-block; background-color: #4870ac; font-size: 1.3em;\">\u4e8c\u3001JSP \u4e5d\u5927\u5185\u7f6e\u5bf9\u8c61<\/h2>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-297e446393dac226.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\/w\/1240\" alt=\"\" data-original-src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-297e446393dac226.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\" \/><\/p>\n<table style=\"display: table; text-align: left; overflow: auto; border-collapse: collapse; margin: 1.4em auto; max-width: 100%; table-layout: fixed; overflow-wrap: break-word; word-break: break-all;\" width=\"800\">\n<thead>\n<tr>\n<th style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top; text-align: center; font-weight: bold; color: #4870ac; background: #f7f7f7;\">\u5bf9\u8c61<\/th>\n<th style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top; text-align: center; font-weight: bold; color: #4870ac; background: #f7f7f7;\">\u7c7b\u578b<\/th>\n<th style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top; text-align: center; font-weight: bold; color: #4870ac; background: #f7f7f7;\">\u8981\u70b9<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">out<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">JspWriter<\/code><\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u5411\u5ba2\u6237\u7aef\u5199\u5185\u5bb9\u6700\u5e38\u7528\u7684\u51fa\u53e3<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">request<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">HttpServletRequest<\/code><\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u5c01\u88c5\u4e00\u6b21\u8bf7\u6c42\uff1b\u8bf7\u6c42\u7ed3\u675f\u524d\u4e00\u76f4\u6709\u6548\uff08\u8bf7\u6c42\u57df\uff09<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">response<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">HttpServletResponse<\/code><\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u672c\u6b21\u9875\u9762\u54cd\u5e94\uff1b\u9875\u9762\u4f5c\u7528\u57df\uff0c\u8fd9\u6b21\u8bbf\u95ee\u6709\u6548<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">session<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">HttpSession<\/code><\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u7b2c\u4e00\u6b21\u8bbf\u95ee\u81ea\u52a8\u521b\u5efa\uff1b\u7528\u6765\u8ba4\u51fa\u662f\u4e0d\u662f\u540c\u4e00\u4e2a\u4eba<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">application<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">ServletContext<\/code><\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u5168\u5c40\u5171\u4eab\uff1b\u670d\u52a1\u5668\u542f\u52a8\u5230\u5173\u95ed<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">request \u5e38\u7528\u65b9\u6cd5<\/h3>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">request.setCharacterEncoding(\"UTF-8\");\/\/\u8bbe\u7f6e\u7f16\u7801\uff0c\u89e3\u51b3\u4e2d\u6587\u4e71\u7801\u95ee\u9898\u3002<\/code><\/pre>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">request.setAttribute(\"\",\"\");\/\/\u524d\u8005\u4e3a\u9700\u8981\u8bbe\u7f6e\u7684\u5c5e\u6027\uff0c\u540e\u8005\u4e3a\u9700\u8981\u7684\u503c\u3002\n\nrequest.getAttribute();<\/code><\/pre>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">request.getRequestDispatcher(\"index.jsp\").forward(request, response);\/\/\u8bf7\u6c42\u8f6c\u53d1\u5230index.jsp\u9875\u9762\uff0c\u8be5\u8bf7\u6c42\u5bf9\u8c61\u662f\u4e00\u76f4\u6709\u6548\u7684\u3002<\/code><\/pre>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">response \u5e38\u7528\u65b9\u6cd5<\/h3>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">response.setContentType(\"text\/html\",\"charset=\"utf-8\");\/\/\u8bbe\u7f6e\u54cd\u5e94\u7684MIMI\u7c7b\u578b\u3002<\/code><\/pre>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">response.sendRedirect(\"index.jsp\");\/\/\u8bf7\u6c42\u91cd\u5b9a\u5411\uff0c\u5982\u679c\u5b58\u5728\u591a\u6b21\u91cd\u5b9a\u5411\uff0c\u90a3\u4e48\u5bf9\u8c61\u6570\u636e\u662f\u4e0d\u4f1a\u4fdd\u5b58\u4e0b\u6765\u7684\uff0c\u5373\u4e3anull\u3002<\/code><\/pre>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u8f6c\u53d1 vs \u91cd\u5b9a\u5411\uff1a<\/strong> \u91cd\u5b9a\u5411\u662f\u5ba2\u6237\u7aef\u884c\u4e3a\uff0c<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">response.sendRedirect()<\/code> \u7b49\u4e8e\u4e24\u6b21\u8bf7\u6c42\uff0c\u4e0a\u6b21 request \u4e0d\u4fdd\u7559\uff0c\u5730\u5740\u680f\u4f1a\u53d8\uff1b\u8f6c\u53d1\u662f\u670d\u52a1\u5668\u884c\u4e3a\uff0c<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">request.getRequestDispatcher().forward()<\/code> \u4ecd\u662f\u4e00\u6b21\u8bf7\u6c42\uff0c\u5bf9\u8c61\u8fd8\u5728\uff0c\u5730\u5740\u680f\u4e0d\u53d8\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u4ec0\u4e48\u662f\u4f1a\u8bdd\uff1a<\/strong> \u4ece\u6253\u5f00\u6d4f\u89c8\u5668\u8fde\u4e0a\u670d\u52a1\u5668\uff0c\u5230\u5173\u6389\u6d4f\u89c8\u5668\u7ed3\u675f\uff0c\u7b97\u4e00\u6b21\u4f1a\u8bdd\u3002\u7528\u6237\u5728\u591a\u4e2a\u9875\u9762\u95f4\u8df3\uff0c\u670d\u52a1\u7aef\u5fc5\u987b\u77e5\u9053\u662f\u4e0d\u662f\u540c\u4e00\u4e2a\u4eba\uff0c\u6240\u4ee5\u624d\u6709 session\u3002<\/p>\n<p style=\"margin: 1em 0px;\">application \u4e0a\u7684\u540c\u4e00\u5c5e\u6027\uff0c\u4e0d\u540c\u7528\u6237\u3001\u524d\u540e\u8fde\u63a5\u90fd\u80fd\u78b0\u5230\uff1b\u4efb\u4f55\u5730\u65b9\u6539\u5b83\uff0c\u90fd\u4f1a\u5f71\u54cd\u5230\u522b\u4eba\u3002<\/p>\n<h2 style=\"padding: 1px 12.5px; color: #ffffff; margin: 1.2em 0px 1em; border-radius: 4px; display: inline-block; background-color: #4870ac; font-size: 1.3em;\">\u4e09\u3001\u6307\u4ee4\u3001\u52a8\u4f5c\u4e0e Session \u751f\u547d\u5468\u671f<\/h2>\n<p style=\"margin: 1em 0px;\">\u4e09\u4e2a\u7f16\u8bd1\u6307\u4ee4\uff1a<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">page<\/code>\u3001<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">include<\/code>\u3001<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">taglib<\/code>\u3002\u4e03\u4e2a\u52a8\u4f5c\uff1a<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">jsp:forward<\/code>\u3001<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">jsp:param<\/code>\u3001<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">jsp:include<\/code>\u3001<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">jsp:plugin<\/code>\u3001<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">jsp:useBean<\/code>\u3001<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">jsp:setProperty<\/code>\u3001<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">jsp:getProperty<\/code>\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-166e26ebf0719089.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\/w\/1240\" alt=\"\" data-original-src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-166e26ebf0719089.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\" \/><\/p>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">include \u6307\u4ee4<\/strong> \u548c <strong style=\"color: #4870ac;\">include \u52a8\u4f5c<\/strong> \u7684\u5dee\u522b\uff1a<\/p>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-e5d8bbd5099e2877.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\/w\/1240\" alt=\"\" data-original-src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-e5d8bbd5099e2877.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\" \/><\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">Session \u7684\u300c\u6d3b\u52a8\u300d\u8fb9\u754c<\/h3>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-952121cb4830e8e3.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\/w\/1240\" alt=\"\" data-original-src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-952121cb4830e8e3.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\" \/><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u540c\u4e00\u6b21\u4f1a\u8bdd\u91cc\uff0c\u8d85\u94fe\u63a5\u6253\u5f00\u7684\u65b0\u9875\u4ecd\u5c5e\u8fd9\u6b21\u4f1a\u8bdd\u3002<\/section>\n<\/li>\n<li>\n<section>\u5f53\u524d\u4f1a\u8bdd\u9875\u6ca1\u5168\u5173\u65f6\uff0c\u518d\u5f00\u7a97\u53e3\u8bbf\u95ee\u540c\u4e00\u9879\u76ee\uff0c\u8fd8\u662f\u540c\u4e00\u6b21\u4f1a\u8bdd\u3002<\/section>\n<\/li>\n<li>\n<section>\u6240\u6709\u9875\u90fd\u5173\u4e86\u518d\u8bbf\u95ee JSP\/Servlet\uff0c\u4f1a\u5efa\u65b0\u4f1a\u8bdd\uff1b\u65e7 SessionId \u53ef\u80fd\u8fd8\u8eba\u5728\u670d\u52a1\u7aef\uff0c\u53ea\u662f\u518d\u4e5f\u6ca1\u5ba2\u6237\u7aef\u5e26\u7740\u5b83\u6765\u6821\u9a8c\u3002<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-becc14804975e191.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\/w\/1240\" alt=\"\" data-original-src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-becc14804975e191.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\" \/><\/p>\n<h2 style=\"padding: 1px 12.5px; color: #ffffff; margin: 1.2em 0px 1em; border-radius: 4px; display: inline-block; background-color: #4870ac; font-size: 1.3em;\">\u56db\u3001\u8fc7\u6ee4\u5668\u4e0e Servlet \u751f\u547d\u5468\u671f<\/h2>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-7c65b1ec75ddf53c.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\/w\/1240\" alt=\"\" data-original-src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-7c65b1ec75ddf53c.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\" \/><\/p>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-2d53c02e3cdc6d08.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\/w\/1240\" alt=\"\" data-original-src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-2d53c02e3cdc6d08.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\" \/><\/p>\n<p style=\"margin: 1em 0px;\">Web \u5bb9\u5668\u542f\u52a8\u65f6\u8fc7\u6ee4\u5668\u5c31\u5df2\u7ecf\u52a0\u8f7d\uff1b\u5b9e\u4f8b\u5316\u53ea\u53d1\u751f\u4e00\u6b21\uff0c\u5bb9\u5668\u91cc\u8fd9\u4efd\u8fc7\u6ee4\u5668\u5b9e\u4f8b\u590d\u7528\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-556f9fbd0064708e.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\/w\/1240\" alt=\"\" data-original-src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-556f9fbd0064708e.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\" \/><\/p>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-74cb5834c8430768.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\/w\/1240\" alt=\"\" data-original-src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-74cb5834c8430768.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\" \/><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u5148\u770b Servlet \u5b9e\u4f8b\u5728\u4e0d\u5728\uff0c\u5728\u5c31\u76f4\u63a5\u54cd\u5e94\u3002<\/section>\n<\/li>\n<li>\n<section>\u521d\u59cb\u5316\uff1a\u521b\u5efa\u5b9e\u4f8b\u540e\u8c03 <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">init<\/code>\u3002<\/section>\n<\/li>\n<li>\n<section>\u54cd\u5e94\uff1a\u8c03 <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">service()<\/code>\uff0c\u518d\u6309\u63d0\u4ea4\u65b9\u5f0f\u8d70 <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">doGet<\/code> \/ <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">doPost<\/code>\u3002<\/section>\n<\/li>\n<li>\n<section>\u7ec8\u6b62\uff1a\u670d\u52a1\u5668\u5173\u95ed\u65f6\u8c03 <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">destroy<\/code>\u3002<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-4b50fd51ea6e4918.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\/w\/1240\" alt=\"\" data-original-src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-4b50fd51ea6e4918.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\" \/><\/p>\n<h2 style=\"padding: 1px 12.5px; color: #ffffff; margin: 1.2em 0px 1em; border-radius: 4px; display: inline-block; background-color: #4870ac; font-size: 1.3em;\">\u4e94\u3001Web \u76d1\u542c\u5668<\/h2>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-f1fe5a535155bb83.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\/w\/1240\" alt=\"\" data-original-src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-f1fe5a535155bb83.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\" \/><\/p>\n<p style=\"margin: 1em 0px;\">\u76d1\u542c\u5668\u662f Servlet \u89c4\u8303\u91cc\u7684\u7279\u6b8a\u7c7b\uff0c\u80fd\u542c\u5ba2\u6237\u7aef\u8bf7\u6c42\u548c\u670d\u52a1\u7aef\u64cd\u4f5c\uff0c\u5bf9\u8c61\u5305\u62ec <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">ServletContext<\/code>\u3001<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">HttpSession<\/code>\u3001<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">ServletRequest<\/code>\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-143f757e0a6b941c.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\/w\/1240\" alt=\"\" data-original-src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-143f757e0a6b941c.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\" \/><\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">\u4e09\u7c7b\u57df\u5bf9\u8c61\u76d1\u542c\u5668<\/h3>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">HttpSession<\/strong> \u4e8b\u4ef6\uff1a<\/p>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-72447c670514c825.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\/w\/1240\" alt=\"\" data-original-src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-72447c670514c825.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\" \/><\/p>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">ServletContext<\/strong> \u4e8b\u4ef6\uff1a<\/p>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-8de7f4704f786eee.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\/w\/1240\" alt=\"\" data-original-src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-8de7f4704f786eee.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\" \/><\/p>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">ServletRequest<\/strong> \u4e8b\u4ef6\uff1a<\/p>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-4e1119657fdca923.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\/w\/1240\" alt=\"\" data-original-src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-4e1119657fdca923.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\" \/><\/p>\n<p style=\"margin: 1em 0px;\">\u4e09\u7c7b\u5206\u522b\u5b9e\u73b0\u56fe\u91cc 1..N \u4e2a\u63a5\u53e3\uff0c\u63a5\u53e3\u65b9\u6cd5\u5c31\u662f\u7528\u9014\u5165\u53e3\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u7ed1\u5b9a\u5230 Session \u57df\u7684\u5bf9\u8c61\u72b6\u6001<\/strong>\uff1a<\/p>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-574d84704db08d25.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\/w\/1240\" alt=\"\" data-original-src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-574d84704db08d25.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\" \/><\/p>\n<p style=\"margin: 1em 0px;\">\u7528\u6237\u4e00\u591a\uff0c\u628a session \u5168\u5806\u5728\u5185\u5b58\u91cc\u5f00\u9500\u5f88\u5927\u3002\u949d\u5316\u5c31\u662f\u628a\u6682\u65f6\u4e0d\u7528\u7684 session \u5e8f\u5217\u5316\u5230\u6587\u4ef6\uff0c\u8981\u7528\u65f6\u518d\u53cd\u5e8f\u5217\u5316\u56de\u6765\u3002<\/p>\n<h2 style=\"padding: 1px 12.5px; color: #ffffff; margin: 1.2em 0px 1em; border-radius: 4px; display: inline-block; background-color: #4870ac; font-size: 1.3em;\">\u516d\u3001Model1 \u4e0e Model2<\/h2>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-6e992bea3f54af36.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\/w\/1240\" alt=\"\" data-original-src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-6e992bea3f54af36.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\" \/><\/p>\n<p style=\"margin: 1em 0px;\">Model1 \u662f\u8f83\u65e9\u7684\u5206\u5c42\uff1aJSP + JavaBean\u3002\u5199\u8d77\u6765\u5feb\uff0c\u53ef\u7ef4\u62a4\u6027\u548c\u6269\u5c55\u6027\u90fd\u4e00\u822c\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-c71e5a5982dd8331.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\/w\/1240\" alt=\"\" data-original-src=\"http:\/\/upload-images.jianshu.io\/upload_images\/4259662-c71e5a5982dd8331.png?imageMogr2\/auto-orient\/strip%7CimageView2\/2\" \/><\/p>\n<ol style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem;\">\n<li>\n<section>JSP \u5411 Servlet \u63d0\u4ea4\u8bf7\u6c42\u3002<\/section>\n<\/li>\n<li>\n<section>\u63a7\u5236\u5c42\u5b9e\u4f8b\u5316\u6216\u8c03\u7528\u6a21\u578b\u5c42\u3002<\/section>\n<\/li>\n<li>\n<section>\u6a21\u578b\u5c42\u8bbf\u95ee\u6570\u636e\u5e93\u3002<\/section>\n<\/li>\n<li>\n<section>\u7ed3\u679c\u56de\u5230\u63a7\u5236\u5c42\u3002<\/section>\n<\/li>\n<li>\n<section>\u63a7\u5236\u5c42\u6309\u7ed3\u679c\u6311\u4e0d\u540c JSP \u7ed9\u7528\u6237\u770b\u3002<\/section>\n<\/li>\n<\/ol>\n<blockquote style=\"display: block; font-size: 0.9em; border-left: 3px solid #4870ac; padding: 0.5em 1em; margin: 0px; background: #f6f8fa; color: #40464f;\">\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u4e00\u53e5\u8bdd\u603b\u7ed3\uff1aWeb \u9762\u8bd5\u628a\u8bf7\u6c42\u94fe\u8def\u8bb2\u6e05\u695a\uff1aJSP \u5148\u7f16\u8bd1\u518d service\uff0c\u4e5d\u5927\u5bf9\u8c61\u5206\u6e05\u4f5c\u7528\u57df\uff0c\u8f6c\u53d1\u4e00\u6b21\u8bf7\u6c42\u3001\u91cd\u5b9a\u5411\u4e24\u6b21\uff0c\u8fc7\u6ee4\u5668\u968f\u5bb9\u5668\u8d77\u3001Servlet \u6309 init\/service\/destroy \u8d70\uff0c\u76d1\u542c\u5668\u76ef\u4e09\u4e2a\u57df\uff0cModel2 \u7528 Servlet \u628a\u89c6\u56fe\u548c\u6a21\u578b\u62c6\u5f00\u3002<\/strong><\/p>\n<\/blockquote>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>Java Web \u9762\u8bd5\u5e38\u628a JSP \/ Servlet \/ Session \/ \u8fc7\u6ee4\u5668 \/ \u76d1\u542c\u5668 \u4e32\u6210\u4e00\u6761\u7ebf [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[46],"tags":[43,171,140],"_links":{"self":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/1922"}],"collection":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1922"}],"version-history":[{"count":2,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/1922\/revisions"}],"predecessor-version":[{"id":2833,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/1922\/revisions\/2833"}],"wp:attachment":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}