RequestDispatcher在另一个Web应用程序中的url

Dav*_*vid 2 jsp servlets

如何RequestDispatcher在同一工作空间中使用外部Web应用程序

在第一个Web应用程序中,我使用它

 RequestDispatcher rd =request.getRequestDispatcher("vote.jsp");
    rd.forward(request, response);
Run Code Online (Sandbox Code Playgroud)

我可以代替vote.jsp

这个网址:

http://localhost:8080/SpeedyServiceClient/JSP/Search/indexS.jsp

Boz*_*zho 8

如果要转发到同一tomcat实例中的其他Web应用程序,您可以:


Sai*_*Sai 5

如果您要访问不同的服务器/ servlet上下文,那么更典型的是......

response.sendRedirect("http://localhost:8080/SpeedyServiceClient/JSP/Search/indexS.jsp");
Run Code Online (Sandbox Code Playgroud)