﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-自由飞翔-随笔分类-jsp</title><link>http://www.blogjava.net/GavinMiao/category/49351.html</link><description>我在仰望，java之上</description><language>zh-cn</language><lastBuildDate>Thu, 22 Dec 2011 18:58:33 GMT</lastBuildDate><pubDate>Thu, 22 Dec 2011 18:58:33 GMT</pubDate><ttl>60</ttl><item><title>转载：http响应码介绍</title><link>http://www.blogjava.net/GavinMiao/archive/2011/12/22/367012.html</link><dc:creator>GavinMiao</dc:creator><author>GavinMiao</author><pubDate>Thu, 22 Dec 2011 06:39:00 GMT</pubDate><guid>http://www.blogjava.net/GavinMiao/archive/2011/12/22/367012.html</guid><wfw:comment>http://www.blogjava.net/GavinMiao/comments/367012.html</wfw:comment><comments>http://www.blogjava.net/GavinMiao/archive/2011/12/22/367012.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/GavinMiao/comments/commentRss/367012.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/GavinMiao/services/trackbacks/367012.html</trackback:ping><description><![CDATA[<span class="Apple-style-span" style="color: #464646; font-family: simsun; background-color: #f8ecd8; "><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">文章来源：</strong></p></span><span class="Apple-style-span" style="color: #464646; font-family: simsun; background-color: #f8ecd8; "><strong style="font-weight: bold; "><div style="display: inline !important; "><a href="http://blog.sina.com.cn/s/blog_46d4a7a6010006wm.html">http://blog.sina.com.cn/s/blog_46d4a7a6010006wm.html</a></div></strong></span><span class="Apple-style-span" style="color: #464646; font-family: simsun; background-color: #f8ecd8; "><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; "><br />HTTP 1.1状态代码及其含义</strong></p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">100 Continue</strong>&nbsp;初始的请求已经接受，客户应当继续发送请求的其余部分。（HTTP 1.1新）</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">101 Switching Protocols</strong>&nbsp;服务器将遵从客户的请求转换到另外一种协议（HTTP 1.1新）</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">200 OK</strong>&nbsp;一切正常，对GET和POST请求的应答文档跟在后面。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">201 Created</strong>&nbsp;服务器已经创建了文档，Location头给出了它的URL。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">202 Accepted</strong>&nbsp;已经接受请求，但处理尚未完成。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">203 Non-Authoritative&nbsp;Information</strong>&nbsp;文档已经正常地返回，但一些应答头可能不正确，因为使用的是文档的拷贝（HTTP 1.1新）。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">204 No Content</strong>&nbsp;没有新文档，浏览器应该继续显示原来的文档。如果用户定期地刷新页面，而Servlet可以确定用户文档足够新，这个状态代码是很有用的。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">205 Reset Content</strong>&nbsp;没有新的内容，但浏览器应该重置它所显示的内容。用来强制浏览器清除表单输入内容（HTTP 1.1新）。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">206 Partial Content</strong>&nbsp;客户发送了一个带有Range头的GET请求，服务器完成了它（HTTP 1.1新）。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">300 Multiple Choices</strong>&nbsp;客户请求的文档可以在多个位置找到，这些位置已经在返回的文档内列出。如果服务器要提出优先选择，则应该在Location应答头指明。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">301 Moved Permanently</strong>&nbsp;客户请求的文档在其他地方，新的URL在Location头中给出，浏览器应该自动地访问新的URL。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">302 Found</strong>&nbsp;类似于301，但新的URL应该被视为临时性的替代，而不是永久性的。注意，在HTTP1.0中对应的状态信息是&#8220;Moved Temporatily&#8221;。<br />出现该状态代码时，浏览器能够自动访问新的URL，因此它是一个很有用的状态代码。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; ">注意这个状态代码有时候可以和301替换使用。例如，如果浏览器错误地请求http://host/~user（缺少了后面的斜杠），有的服务器返回301，有的则返回302。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; ">严格地说，我们只能假定只有当原来的请求是GET时浏览器才会自动重定向。请参见307。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">303 See Other</strong>&nbsp;类似于301/302，不同之处在于，如果原来的请求是POST，Location头指定的重定向目标文档应该通过GET提取（HTTP 1.1新）。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">304 Not Modified</strong>&nbsp;客户端有缓冲的文档并发出了一个条件性的请求（一般是提供If-Modified-Since头表示客户只想比指定日期更新的文档）。服务器告诉客户，原来缓冲的文档还可以继续使用。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">305 Use Proxy</strong>&nbsp;客户请求的文档应该通过Location头所指明的代理服务器提取（HTTP 1.1新）。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">307 Temporary Redirect</strong>&nbsp;和302（Found）相同。许多浏览器会错误地响应302应答进行重定向，即使原来的请求是POST，即使它实际上只能在POST请求的应答是303时才能重定向。由于这个原因，HTTP 1.1新增了307，以便更加清除地区分几个状态代码：当出现303应答时，浏览器可以跟随重定向的GET和POST请求；如果是307应答，则浏览器只能跟随对GET请求的重定向。（HTTP 1.1新）</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">400 Bad Request</strong>&nbsp;请求出现语法错误。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">401 Unauthorized</strong>&nbsp;客户试图未经授权访问受密码保护的页面。应答中会包含一个WWW-Authenticate头，浏览器据此显示用户名字/密码对话框，然后在填写合适的Authorization头后再次发出请求。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">403 Forbidden</strong>&nbsp;资源不可用。服务器理解客户的请求，但拒绝处理它。通常由于服务器上文件或目录的权限设置导致。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">404 Not Found</strong>&nbsp;无法找到指定位置的资源。这也是一个常用的应答。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">405 Method Not Allowed</strong>&nbsp;请求方法（GET、POST、HEAD、Delete、PUT、TRACE等）对指定的资源不适用。（HTTP 1.1新）</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">406 Not Acceptable</strong>&nbsp;指定的资源已经找到，但它的MIME类型和客户在Accpet头中所指定的不兼容（HTTP 1.1新）。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">407 Proxy Authentication Required</strong>&nbsp;类似于401，表示客户必须先经过代理服务器的授权。（HTTP 1.1新）</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">408 Request Timeout</strong>&nbsp;在服务器许可的等待时间内，客户一直没有发出任何请求。客户可以在以后重复同一请求。（HTTP 1.1新）</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">409 Conflict</strong>&nbsp;通常和PUT请求有关。由于请求和资源的当前状态相冲突，因此请求不能成功。（HTTP 1.1新）</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">410 Gone</strong>&nbsp;所请求的文档已经不再可用，而且服务器不知道应该重定向到哪一个地址。它和404的不同在于，返回407表示文档永久地离开了指定的位置，而404表示由于未知的原因文档不可用。（HTTP 1.1新）</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">411 Length Required</strong>&nbsp;服务器不能处理请求，除非客户发送一个Content-Length头。（HTTP 1.1新）</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">412 Precondition Failed</strong>&nbsp;请求头中指定的一些前提条件失败（HTTP 1.1新）。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">413 Request Entity Too Large</strong>&nbsp;目标文档的大小超过服务器当前愿意处理的大小。如果服务器认为自己能够稍后再处理该请求，则应该提供一个Retry-After头（HTTP 1.1新）。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">414 Request URI Too Long</strong>&nbsp;URI太长（HTTP 1.1新）。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">416 Requested Range Not Satisfiable</strong>&nbsp;服务器不能满足客户在请求中指定的Range头。（HTTP 1.1新）</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">500 Internal Server Error</strong>&nbsp;服务器遇到了意料不到的情况，不能完成客户的请求。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; "><strong style="font-weight: bold; ">501 Not Implemented</strong>&nbsp;服</p></span><img src ="http://www.blogjava.net/GavinMiao/aggbug/367012.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/GavinMiao/" target="_blank">GavinMiao</a> 2011-12-22 14:39 <a href="http://www.blogjava.net/GavinMiao/archive/2011/12/22/367012.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>tree和menu控件</title><link>http://www.blogjava.net/GavinMiao/archive/2011/11/24/364732.html</link><dc:creator>GavinMiao</dc:creator><author>GavinMiao</author><pubDate>Thu, 24 Nov 2011 07:22:00 GMT</pubDate><guid>http://www.blogjava.net/GavinMiao/archive/2011/11/24/364732.html</guid><wfw:comment>http://www.blogjava.net/GavinMiao/comments/364732.html</wfw:comment><comments>http://www.blogjava.net/GavinMiao/archive/2011/11/24/364732.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/GavinMiao/comments/commentRss/364732.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/GavinMiao/services/trackbacks/364732.html</trackback:ping><description><![CDATA[Xtree<br />download及demo页面：<a href="http://webfx.eae.net/dhtml/xtree/index.html">http://webfx.eae.net/dhtml/xtree/index.html<br /><font class="Apple-style-span" color="#000000">api页面：<div style="display: inline-block; "></div></font><span class="Apple-style-span" style="color: #6d6d6d; font-family: arial; line-height: 26px; -webkit-text-decorations-in-effect: none; background-color: #ffffff; font-size: medium; "><a style="color: #1463c4; text-decoration: none; ">http://webfx.eae.net/dhtml/xtree/api.html&nbsp;<br /><br />参考文章：</a></span><span class="Apple-style-span" style="color: #1463c4; font-family: arial; line-height: 26px; background-color: #ffffff; font-size: medium; "><a href="http://apps.hi.baidu.com/share/detail/45745962">http://apps.hi.baidu.com/share/detail/45745962</a></span><span class="Apple-style-span" style="font-family: arial; line-height: 26px; -webkit-text-decorations-in-effect: none; background-color: #ffffff; font-size: medium; "><a><br /></a></span><font class="Apple-style-span" color="#000000"><div>大量开源menu控件：<a href="http://www.open-open.com/ajax/Menu.htm">http://www.open-open.com/ajax/Menu.htm<br />easy</a>ui Menu及ext tree等；</div></font><br /></a><img src ="http://www.blogjava.net/GavinMiao/aggbug/364732.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/GavinMiao/" target="_blank">GavinMiao</a> 2011-11-24 15:22 <a href="http://www.blogjava.net/GavinMiao/archive/2011/11/24/364732.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>fmt:message与fmt：fmt:setBundle</title><link>http://www.blogjava.net/GavinMiao/archive/2011/09/28/359690.html</link><dc:creator>GavinMiao</dc:creator><author>GavinMiao</author><pubDate>Wed, 28 Sep 2011 06:08:00 GMT</pubDate><guid>http://www.blogjava.net/GavinMiao/archive/2011/09/28/359690.html</guid><wfw:comment>http://www.blogjava.net/GavinMiao/comments/359690.html</wfw:comment><comments>http://www.blogjava.net/GavinMiao/archive/2011/09/28/359690.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/GavinMiao/comments/commentRss/359690.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/GavinMiao/services/trackbacks/359690.html</trackback:ping><description><![CDATA[<span class="Apple-style-span" style="color: #becdcd; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; background-color: #3c4e4e; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span><span style="font-family: Arial; color: #000000; background-color: white; ">参考文章：</span></span></p></span><span class="Apple-style-span" style="font-family: Arial; line-height: 25px; background-color: #ffffff; "><a href="http://cainwise.iteye.com/blog/369836">http://cainwise.iteye.com/blog/369836</a></span><span class="Apple-style-span" style="color: #becdcd; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; background-color: #3c4e4e; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span><span style="font-family: Arial; color: #000000; background-color: white; ">&nbsp;<br />&lt;fmt:<span style="color: #000000; background-color: white; ">message</span></span><span style="font-family: Arial; color: #000000; background-color: white; ">&gt;</span>&nbsp;</span><span style="color: #000000; background-color: white; ">标签属性和说明</span>&nbsp;<span style="color: #000000; background-color: white; ">：</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;</p><table dir="ltr" border="0" cellspacing="0" cellpadding="0" width="455" style="height: 153px; "><tbody><tr><td width="75" height="23" style="font-size: 1em; border-right-color: black; border-right-style: solid; border-top-color: black; border-top-width: 2px; border-top-style: solid; vertical-align: top; border-left-color: black; border-left-width: 2px; border-left-style: solid; border-bottom-color: black; border-bottom-style: solid; "><div><span>属性</span><span></span></div></td><td width="380" height="23" style="font-size: 1em; border-right-color: black; border-right-width: 2px; border-right-style: solid; border-top-color: black; border-top-width: 2px; border-top-style: solid; vertical-align: top; border-left-color: black; border-left-style: solid; border-bottom-color: black; border-bottom-style: solid; "><div><span>描述</span><span></span></div></td></tr><tr><td width="75" height="36" style="font-size: 1em; border-right-color: black; border-right-style: solid; border-top-color: black; border-top-style: solid; vertical-align: top; border-left-color: black; border-left-width: 2px; border-left-style: solid; border-bottom-color: black; border-bottom-style: solid; "><div><span lang="EN-US">key</span></div></td><td width="380" height="36" style="font-size: 1em; border-right-color: black; border-right-width: 2px; border-right-style: solid; border-top-color: black; border-top-style: solid; vertical-align: top; border-left-color: black; border-left-style: solid; border-bottom-color: black; border-bottom-style: solid; "><div><span>资源配置文件的</span><span>&#8220;</span><span>键</span><span>&#8221;</span><span>指定</span><span></span></div></td></tr><tr><td width="75" height="45" style="font-size: 1em; border-right-color: black; border-right-style: solid; border-top-color: black; border-top-style: solid; vertical-align: top; border-left-color: black; border-left-width: 2px; border-left-style: solid; border-bottom-color: black; border-bottom-style: solid; "><div><span lang="EN-US">bundle</span></div></td><td width="380" height="45" style="font-size: 1em; border-right-color: black; border-right-width: 2px; border-right-style: solid; border-top-color: black; border-top-style: solid; vertical-align: top; border-left-color: black; border-left-style: solid; border-bottom-color: black; border-bottom-style: solid; "><div><span>若使用</span><span>&nbsp;&lt;fmt:setBundle&gt;&nbsp;</span><span>保存了资源配置文件，该属性就可以从保存的资源配</span><span>置文件中进行查找</span><span></span></div></td></tr><tr><td width="75" height="26" style="font-size: 1em; border-right-color: black; border-right-style: solid; border-top-color: black; border-top-style: solid; vertical-align: top; border-left-color: black; border-left-width: 2px; border-left-style: solid; border-bottom-color: black; border-bottom-style: solid; "><div><span lang="EN-US">var</span></div></td><td width="380" height="26" style="font-size: 1em; border-right-color: black; border-right-width: 2px; border-right-style: solid; border-top-color: black; border-top-style: solid; vertical-align: top; border-left-color: black; border-left-style: solid; border-bottom-color: black; border-bottom-style: solid; "><div><span>将显示信息保存为一个变量</span><span></span></div></td></tr><tr><td width="75" height="26" style="font-size: 1em; border-right-color: black; border-right-style: solid; border-top-color: black; border-top-style: solid; vertical-align: top; border-left-color: black; border-left-width: 2px; border-left-style: solid; border-bottom-color: black; border-bottom-width: 2px; border-bottom-style: solid; "><div><span lang="EN-US">scope</span></div></td><td width="380" height="26" style="font-size: 1em; border-right-color: black; border-right-width: 2px; border-right-style: solid; border-top-color: black; border-top-style: solid; vertical-align: top; border-left-color: black; border-left-style: solid; border-bottom-color: black; border-bottom-width: 2px; border-bottom-style: solid; "><div><span>变量的作用范围</span><span></span></div></td></tr></tbody></table><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;<br /></p></span><span class="Apple-style-span" style="color: #becdcd; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; background-color: #3c4e4e; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span><span style="font-family: Arial; background-color: white; color: #000000; ">&lt;fmt:bundle&gt;</span>&nbsp;</span><span style="background-color: white; color: #000000; ">、</span>&nbsp;<span><span style="font-family: Arial; background-color: white; color: #000000; ">&lt;fmt:setBundle&gt;</span>&nbsp;</span><span style="background-color: white; color: #000000; ">标签属性和说明</span>&nbsp;<span style="background-color: white; color: #000000; ">：</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;</p><table dir="ltr" border="0" cellspacing="0" cellpadding="0" width="455" style="height: 113px; "><tbody><tr><td width="75" height="23" style="font-size: 1em; border-right-color: black; border-right-style: solid; border-top-color: black; border-top-width: 2px; border-top-style: solid; vertical-align: top; border-left-color: black; border-left-width: 2px; border-left-style: solid; border-bottom-color: black; border-bottom-style: solid; "><div><span>属性</span><span></span></div></td><td width="380" height="23" style="font-size: 1em; border-right-color: black; border-right-width: 2px; border-right-style: solid; border-top-color: black; border-top-width: 2px; border-top-style: solid; vertical-align: top; border-left-color: black; border-left-style: solid; border-bottom-color: black; border-bottom-style: solid; "><div><span>描述</span><span></span></div></td></tr><tr><td width="75" height="36" style="font-size: 1em; border-right-color: black; border-right-style: solid; border-top-color: black; border-top-style: solid; vertical-align: top; border-left-color: black; border-left-width: 2px; border-left-style: solid; border-bottom-color: black; border-bottom-style: solid; "><div><span lang="EN-US">basename</span></div></td><td width="380" height="36" style="font-size: 1em; border-right-color: black; border-right-width: 2px; border-right-style: solid; border-top-color: black; border-top-style: solid; vertical-align: top; border-left-color: black; border-left-style: solid; border-bottom-color: black; border-bottom-style: solid; "><div><span>资源配置文件的指定，只需要指定文件名而无须扩展名，二组标签共有的属性</span></div></td></tr><tr><td width="75" height="31" style="font-size: 1em; border-right-color: black; border-right-style: solid; border-top-color: black; border-top-style: solid; vertical-align: top; border-left-color: black; border-left-width: 2px; border-left-style: solid; border-bottom-color: black; border-bottom-style: solid; "><div><span lang="EN-US">var</span></div></td><td width="380" height="31" style="font-size: 1em; border-right-color: black; border-right-width: 2px; border-right-style: solid; border-top-color: black; border-top-style: solid; vertical-align: top; border-left-color: black; border-left-style: solid; border-bottom-color: black; border-bottom-style: solid; "><div><span><span>&nbsp;</span>&lt;fmt:setBundle&gt;&nbsp;</span><span>独有的属性，用于保存资源配置文件为一个变量</span><span></span></div></td></tr><tr><td width="75" height="26" style="font-size: 1em; border-right-color: black; border-right-style: solid; border-top-color: black; border-top-style: solid; vertical-align: top; border-left-color: black; border-left-width: 2px; border-left-style: solid; border-bottom-color: black; border-bottom-width: 2px; border-bottom-style: solid; "><div><span lang="EN-US">scope</span></div></td><td width="380" height="26" style="font-size: 1em; border-right-color: black; border-right-width: 2px; border-right-style: solid; border-top-color: black; border-top-style: solid; vertical-align: top; border-left-color: black; border-left-style: solid; border-bottom-color: black; border-bottom-width: 2px; border-bottom-style: solid; "><div><span><span>&nbsp;</span></span><span>变量的作用范围</span><span></span></div></td></tr></tbody></table><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;</p></span>eg1：<br /><span class="Apple-style-span" style="color: #becdcd; font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Consolas, 'Courier New', monospace; font-size: 12px; line-height: 25px; background-color: #3c4e4e; "><ol start="1" class="dp-j" style="font-size: 1em; line-height: 1.4em; margin-top: 0px; margin-right: 0px; margin-bottom: 1px; margin-left: 0px; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #d1d7dc; border-right-color: #d1d7dc; border-bottom-color: #d1d7dc; border-left-color: #d1d7dc; list-style-type: decimal; list-style-position: initial; list-style-image: initial; background-color: #ffffff; color: #2b91af; "><li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; "><span style="color: black; ">&lt;body&gt;&nbsp;&nbsp;</span></span></li><li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">&nbsp;&nbsp;&lt;%request.setAttribute(<span class="string" style="color: blue; ">"language"</span><span style="color: black; ">,</span><span class="string" style="color: blue; ">"zh_CN"</span><span style="color: black; ">);&nbsp;%&gt;</span><span class="comment" style="color: #008200; ">//这里可以从客户端选择的语言那里获取</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li><li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">&nbsp;&nbsp;&nbsp;&nbsp;&lt;fmt:setLocale&nbsp;value=<span class="string" style="color: blue; ">"${language}"</span><span style="color: black; ">/&gt;</span><span class="comment" style="color: #008200; ">//这里是设置显示页面的语言</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li><li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">&nbsp;&nbsp;&nbsp;&nbsp;&lt;fmt:setBundle&nbsp;basename=<span class="string" style="color: blue; ">"message"</span><span style="color: black; ">&nbsp;var=</span><span class="string" style="color: blue; ">"messages"</span><span style="color: black; ">/&gt;</span><span class="comment" style="color: #008200; ">//这里是获取到国际化文件</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li><li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;fmt:bundle&nbsp;basename=<span class="string" style="color: blue; ">"message"</span><span style="color: black; ">&gt;&nbsp;&nbsp;</span></span></li><li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;fmt:message&nbsp;key=<span class="string" style="color: blue; ">"com.name"</span><span style="color: black; ">/&gt;</span><span class="comment" style="color: #008200; ">//获取key第一种方式</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li><li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;br&gt;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;fmt:message&nbsp;key=<span class="string" style="color: blue; ">"com.name"</span><span style="color: black; ">&nbsp;bundle=</span><span class="string" style="color: blue; ">"${messages}"</span><span style="color: black; ">&gt;&lt;/fmt:message&gt;</span><span class="comment" style="color: #008200; ">//获取key第二种方式</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li><li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/fmt:bundle&gt;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">&nbsp;&nbsp;&lt;/body&gt; &nbsp;</span></li></ol></span><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><img src ="http://www.blogjava.net/GavinMiao/aggbug/359690.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/GavinMiao/" target="_blank">GavinMiao</a> 2011-09-28 14:08 <a href="http://www.blogjava.net/GavinMiao/archive/2011/09/28/359690.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>eXtremeComponents总结（转载）</title><link>http://www.blogjava.net/GavinMiao/archive/2011/09/16/358766.html</link><dc:creator>GavinMiao</dc:creator><author>GavinMiao</author><pubDate>Fri, 16 Sep 2011 02:23:00 GMT</pubDate><guid>http://www.blogjava.net/GavinMiao/archive/2011/09/16/358766.html</guid><wfw:comment>http://www.blogjava.net/GavinMiao/comments/358766.html</wfw:comment><comments>http://www.blogjava.net/GavinMiao/archive/2011/09/16/358766.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/GavinMiao/comments/commentRss/358766.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/GavinMiao/services/trackbacks/358766.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp;只有注册用户登录后才能阅读该文。<a href='http://www.blogjava.net/GavinMiao/archive/2011/09/16/358766.html'>阅读全文</a><img src ="http://www.blogjava.net/GavinMiao/aggbug/358766.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/GavinMiao/" target="_blank">GavinMiao</a> 2011-09-16 10:23 <a href="http://www.blogjava.net/GavinMiao/archive/2011/09/16/358766.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>jsp相对路径和绝对路径</title><link>http://www.blogjava.net/GavinMiao/archive/2011/08/22/357009.html</link><dc:creator>GavinMiao</dc:creator><author>GavinMiao</author><pubDate>Sun, 21 Aug 2011 18:29:00 GMT</pubDate><guid>http://www.blogjava.net/GavinMiao/archive/2011/08/22/357009.html</guid><wfw:comment>http://www.blogjava.net/GavinMiao/comments/357009.html</wfw:comment><comments>http://www.blogjava.net/GavinMiao/archive/2011/08/22/357009.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/GavinMiao/comments/commentRss/357009.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/GavinMiao/services/trackbacks/357009.html</trackback:ping><description><![CDATA[<div><div><span style="font-size: 12pt; ">一、<br />1、&lt;base&gt;标签的作用：</span><span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 18px; font-size: 12pt; ">为页面上的所有链接规定默认地址或默认目标。<br /></span><span style="font-size: 12pt; ">2、&lt;base&gt;标签的两个属性，target：</span><span class="Apple-style-span" style="border-collapse: collapse; font-family: Arial, Helvetica, sans-serif; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; line-height: normal; font-size: 12pt; ">在何处打开页面中所有的链接；</span><span class="Apple-style-span" style="border-collapse: collapse; font-family: Arial, Helvetica, sans-serif; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; line-height: normal; font-size: 12pt; ">href:</span><span class="Apple-style-span" style="border-collapse: collapse; font-family: Arial, Helvetica, sans-serif; font-size: 12px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; line-height: normal; "><span class="Apple-style-span" style="font-family: verdana, 'courier new'; line-height: 21px; border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-size: 12pt; ">规定页面中所有相对链接的基准 URL。</span><br /></span>3、例子：<br />1）<br />&lt;%</div><div>String path = request.getContextPath();</div><div>String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";</div><div>%&gt;<br /><div>&lt;base href="&lt;%=basePath%&gt;"&gt;<br /><br />jsp页面显示：<br />basePath：<br />http://localhost:8080/testProject/<br />2）<br /><div>&lt;% String realPath = application.getRealPath("/"); %&gt;<br /><br /><div>jsp页面显示：<br />realPath：<br /><div>D:\tomcat\webapps\testProject\<br />3）<br /><div style="display: inline-block; "><div>${request.contextPath}<br /><div>jsp页面显示：<br />contextPath：</div>/testProject<br />4)<br />如果请求是http://localhost:8080/testProject/page/test.jsp;<br /><br /><div>&lt;%=request.getRequestURI() %&gt;<br /><div><div style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">jsp页面显示：<br />requestURI：</div><div>/testProject/page/test.jsp</div></div></div>二、<br />1、文件分隔符：unix系统：&#8220;/&#8221;,windows系统：&#8220;\&#8221;;<br /><div>System.getProperty("file.separator")</div>2、路径分隔符：unix系统：&#8220;:&#8221;，windows系统：&#8220;;&#8221;；<br /><div>System.getProperty("path.separator");<br />三、</div><div>1. &lt;%=Thread.currentThread().getContextClassLoader().getResource("") %&gt;<br /><div><div style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">jsp页面显示：</div><div style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><div>file:/D:/tomcat/webapps/testProject/WEB-INF/classes/</div></div></div></div><br /><div>参考文章来源：<a href="http://starlight00.blog.163.com/blog/static/465183200992111154321/">http://starlight00.blog.163.com/blog/static/465183200992111154321/</a></div></div></div></div></div></div></div></div></div><img src ="http://www.blogjava.net/GavinMiao/aggbug/357009.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/GavinMiao/" target="_blank">GavinMiao</a> 2011-08-22 02:29 <a href="http://www.blogjava.net/GavinMiao/archive/2011/08/22/357009.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>jsp scriptlet</title><link>http://www.blogjava.net/GavinMiao/archive/2011/08/10/356268.html</link><dc:creator>GavinMiao</dc:creator><author>GavinMiao</author><pubDate>Wed, 10 Aug 2011 11:05:00 GMT</pubDate><guid>http://www.blogjava.net/GavinMiao/archive/2011/08/10/356268.html</guid><wfw:comment>http://www.blogjava.net/GavinMiao/comments/356268.html</wfw:comment><comments>http://www.blogjava.net/GavinMiao/archive/2011/08/10/356268.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/GavinMiao/comments/commentRss/356268.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/GavinMiao/services/trackbacks/356268.html</trackback:ping><description><![CDATA[jsp有中调用java方式：<br /><span class="Apple-style-span" style="color: #555555; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: Arial; color: #000000; ">&nbsp;</span><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: Arial; color: #000000; ">&lt;%%&gt;</span><span times="" new=""  roman';="" ""="" '="" roman'"="" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: Arial; color: #000000; ">：scriptlet<br /></span></span><span class="Apple-style-span" style="color: #555555; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: Arial; color: #000000; ">&lt;%!%&gt;</span><span times="" new=""  roman';="" ""="" '="" roman'"="" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: Arial; color: #000000; ">：声明<br /></span></span><span class="Apple-style-span" style="line-height: 28px; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: Arial; color: #000000; ">&lt;%=%&gt;</span><span times="" new=""  roman';="" ""="" '="" roman'"="" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" face="Arial">：表达式</font><br /><div><font class="Apple-style-span" face="Arial">yourJspName_jsp.java对应 yourname.jsp</font><br /><div><font class="Apple-style-span" face="Arial">经验证，&lt;%! code %&gt;无论写在yourname.jsp的任何位置，code都处在yourJspName_jsp.java的成员声明中；</font><br /><div style="color: #000000; font-family: Arial; ">经验证，<span class="Apple-style-span" style="color: #555555; font-family: 宋体, 'Arial Narrow', arial, serif; ">&nbsp;<span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: Arial; color: #000000; ">&lt;% code %&gt;</span></span>无论写在yourname.jsp的任何位置，code都处在yourJspName_jsp.java的_jspService成员方法中；<br />经验证，<span class="Apple-style-span" style="color: #555555; font-family: 宋体, 'Arial Narrow', arial, serif; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: Arial; color: #000000; ">&lt;%=statement%&gt;无论</span></span><span class="Apple-style-span" style="font-family: verdana, 'courier new'; ">写在yourname.jsp的任何位置，</span>statement<span class="Apple-style-span" style="font-family: verdana, 'courier new'; ">都处在yourJspName_jsp.java的_jspService成员方法中的out.write(<span class="Apple-style-span" style="font-family: Arial; ">statement</span>)中；<br />注意：<br />1.</span><span class="Apple-style-span" style="font-family: simsun; line-height: 23px; ">用 &lt;%! &nbsp; %&gt; 定义的变量，成为这个类的变量，</span><span class="Apple-style-span" style="font-family: verdana, 'courier new'; ">用 &lt;%! &nbsp; %&gt; 定义的方法也是如此，成为这个类的方法。<br />2.</span><span class="Apple-style-span" style="font-family: simsun; line-height: 23px; ">&lt;%...%&gt; 中定义的变量其实是方法 &nbsp; _jspService() &nbsp; 的内部变量. 即类的局部变量。</span></div></div></div></span></span><img src ="http://www.blogjava.net/GavinMiao/aggbug/356268.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/GavinMiao/" target="_blank">GavinMiao</a> 2011-08-10 19:05 <a href="http://www.blogjava.net/GavinMiao/archive/2011/08/10/356268.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>