2011-07-01 14 views
-2

你好,我有2個網絡應用程序在同一個工作空間 我怎麼能從第一個webb應用程序的頁面重定向到第二個web應用程序?我可以在2個Web應用程序之間的jsp重定向嗎?

在一個韋伯應用

我使用:

RequestDispatcher req =request.getRequestDispatcher("vote.jsp"); 
req.forward(request, response); 

我想重定向如果會議不開,所以我不能使用

<META HTTP-EQUIV="Refresh" CONTENT="0; URL=/test/"/> 

我需要像RequestDispatcher

一些事情

回答

0

我的朋友喜歡這樣做:

{out.println("Si votre navigateur ne support pas la redirection automatique <a href='http://localhost:8080/HiberBarti/JSP/session/index.jsp'> Click Ic</a>"); 

String url ="http://localhost:8080/HiberBarti/JSP/session/index.jsp"; 
//encodeRedirectURL(url); 
//sendRedirect(url); 
response.sendRedirect(response.encodeRedirectURL(url)); 
} 
相關問題