﻿<?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-j2ee综合-文章分类-jsp/servlet</title><link>http://www.blogjava.net/sheeplove/category/24312.html</link><description>j2ee综合（无所不谈）
</description><language>zh-cn</language><lastBuildDate>Sun, 22 Jul 2007 17:40:40 GMT</lastBuildDate><pubDate>Sun, 22 Jul 2007 17:40:40 GMT</pubDate><ttl>60</ttl><item><title>jsp、servlet重定向</title><link>http://www.blogjava.net/sheeplove/articles/jsp.html</link><dc:creator>sheeplove</dc:creator><author>sheeplove</author><pubDate>Sat, 21 Jul 2007 12:47:00 GMT</pubDate><guid>http://www.blogjava.net/sheeplove/articles/jsp.html</guid><wfw:comment>http://www.blogjava.net/sheeplove/comments/131657.html</wfw:comment><comments>http://www.blogjava.net/sheeplove/articles/jsp.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/sheeplove/comments/commentRss/131657.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/sheeplove/services/trackbacks/131657.html</trackback:ping><description><![CDATA[<p>1、jsp中重定向主要为response.sendRedirect，这个比较简单，不做介绍。主要一点就是可以定位到不同的服务器上。</p>
<p>2、Servlet中RequestDispatcher.forward()，只能在服务器内部定向，同时为了服务器之间的移植，重定向的URL最好是以&#8220;/&#8221;开头，在tomcat、weblogic中，可以使用相对的URL，但是在websphere中，不能使用相对的，如&#8220;../&#8221;。如果不以&#8220;/&#8221;开头，在websphere 上可能无法访问页面。<br></p>
<p>3、当然，还可以使用jsp其他的重定向，在此不做介绍。<br></p>
<img src ="http://www.blogjava.net/sheeplove/aggbug/131657.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/sheeplove/" target="_blank">sheeplove</a> 2007-07-21 20:47 <a href="http://www.blogjava.net/sheeplove/articles/jsp.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>