📄 168.html
字号:
<STYLE type=text/css>
<!--
body,td { font-size:9pt;}
hr { color: #000000; height: 1px}
-->
</STYLE>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD><TITLE>FAQ汇萃 >> Tomcat >> 为什么encodeURL() 在 Apache-Tomcat 一起工作的时候不正常?</title>
</head>
<body >
<p><IMG SRC="../image/jsp001_middle_logo.gif" WIDTH="180" HEIGHT="60" BORDER=0 ALT=""></p>
<table width=100% bgcolor="#cccccc" align=center cellpadding="2" cellspacing="0" border=1 bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr bgcolor="#EFF8FF"><td>
<a href=../list_thread.php?int_attribute=1>FAQ汇萃</a>
>> <a href=../list_thread.php?forumid=11&int_attribute=1>Tomcat</a>
>> 为什么encodeURL() 在 Apache-Tomcat 一起工作的时候不正常? [<a href=../forum/showthread.php?goto=newpost&threadid=168>查看别人的评论</a>]<br>
<hr><p>由 webmaster 发布于: 2001-01-30 10:14</p><p><img src="images/icons/icon10.gif" alt="Talking" border=0> </p><p>To: tomcat-user@jakarta.apache.org
<br>Subject: Re: P: session tracking * encodeURL
<br>From: Jason Rumney <jrumney@ipo.att.com>
<br>Date: 18 May 2000 14:38:58 +0100
<br>
<br>Johannes_Lorenz@mn.man.de writes:
<br>
<br>> Hello,
<br>>
<br>> i use the methode encodeURL for rewriting URLs. It's working, if i use tomcat
<br>> standalone, but it doesn't work in the apache-tomcat environment.
<br>>
<br>> Has anybody else seen this effect?
<br>
<br>The problem is that Apache does not recognize the semicolon that
<br>separates the session id from the rest of the URL as being anything
<br>special, so rules based on file extension for example, won't match
<br>properly.
<br>
<br>> Is there a workaround (i won't use cookies)?
<br>
<br>I have the following rewrite rule in my apache config to fix this:
<br>
<br>
<br> <IfModule mod_rewrite.c>
<br> RewriteEngine on
<br> # Force URLs with a jsessionid to go to Tomcat. Necessary because
<br> # Apache doesn't recognise that the semi-colon is special.
<br> RewriteRule ^(/.*;jsessionid=.*)$ $1 [T=jserv-servlet]
<br> </IfModule>
<br>
<br>
<br>If you access a servlet via the standard-http port 80 (either running tomcat on that port or accessing it through apache) the encodeURL and encodeRedirectURL methods don't work properly in Tomcat 3.1. <font color=red>This is fixed in Tomcat 3.2beta2.</font></p></td>
</tr>
</table>
<p>
<CENTER><a href="../forum/newreply.php?action=newreply&threadid=168">点这里对该文章发表评论</a></CENTER>
<p>该文章总得分是 <font color=red>0</font> 分,你认为它对你有帮助吗?
[<a href=javascript:void(0) onclick=window.open("../forum/codeVote.php?threadid=168&intVote=4","","menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,width=70,height=40,top=0,left=0")>非常多</a>](<font color=red>0</font>)
[<a href=javascript:void(0) onclick=window.open("../forum/codeVote.php?threadid=168&intVote=2","","menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,width=70,height=40,top=0,left=0")>有一些</a>](<font color=red>0</font>)
[<a href=javascript:void(0) onclick=window.open("../forum/codeVote.php?threadid=168&intVote=1","","menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,width=70,height=40,top=0,left=0")>无帮助</a>](<font color=red>0</font>)
[<a href=javascript:void(0) onclick=window.open("../forum/codeVote.php?threadid=168&intVote=-1","","menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,width=70,height=40,top=0,left=0")>是灌水</a>](<font color=red>0</font>) </p>
<script language="javascript" src="../include/read_thread_script.php?threadid=168"></script>
<p><CENTER>
Copyright © 2001 - 2009 JSP001.com . All Rights Reserved <P>
<IMG SRC="../image/jsp001_small_logo.gif" WIDTH="85" HEIGHT="30" BORDER=0 ALT="">
</CENTER></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -