- - PR -
sendRedirectで遷移しようとすると"This document has moved〜”と表示される
1
| 投稿者 | 投稿内容 |
|---|---|
|
投稿日時: 2003-09-11 02:03
いつも参考にさせて頂いています。 HttpServletResponseクラスのsendRedirectメソッドを利用してPDFファイルに遷移させようとしていますが、以下のソースのHTMLファイルが表示されます。 <head><title>Document moved</title></head> <body><h1>Document moved</h1> This document has moved <a href="http://hogehogeHost/virtualDir/test.pdf">here</a>.<p> </body> "here"をクリックするとpdfファイルのURLに遷移します。 なお、WebサーバはIISを使っており、URLの"virtualDir"仮想ディレクトリには、仮にWebサーバのAdministratorのデスクトップを指定しています。 以前、ネットワーク上の他のマシンの"C:\hogehogeDir\"を仮想ディレクトリとして設定していたときは正常に遷移できました。 何故、"Document moved"のHTMLファイルが表示されてしまうのでしょうか? ご存知の方、ご教授お願いします。 sendRedirectを行うソースはこんな感じです。 public class sendRedirectServlet extends HttpServlet { public void doService( HttpServletRequest request , HttpServletResponse response ) throws Exception { ・・・略・・・ response.sendRedirect( "http://hogehogeHost/virtualDir/test.pdf"); ・・・略・・・ } } |
1
