I want to use URLRewriting concept in my project by using Tomcat 6 server.But when the browser supports cookies then container will ignore URLRewriting concept.So How do i explicitly mention to the Tomcat6 server to use URLRewrting concept always even though the browser supports the cookies.
1 に答える
0
アプリケーション ファイル内の/META-INF/context.xmlを変更し、コンテキスト属性 cookies=falseの 1 つを設定する必要があります。
<?xml version='1.0' encoding='utf-8'?>
<Context docBase="PATH_TO_WEBAPP" path="/CONTEXT" cookies="false">
</Context>
ただし、java.servlet.http.HttpServletResponse
メソッドencodeURL(String url)
を明示的に使用encodeRedirectURL(String URL)
し、URL で SessionID をエンコードして URL 書き換えをサポートする必要があります。
于 2013-05-26T13:42:52.287 に答える