2011-07-01 23 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)); 
} 
相关问题