JSPページを1つのサーブレットからリダイレクトしたい。 すべてのJSPページはWeb Content
です。いいえunder Web-INF
。 私はそのJSPページを呼び出すのに問題があります。私は404エラーがあります。パスの問題。ServletからjspをリダイレクトRequestDispatcher
ウェブコンテンツの下でjspページを呼び出すにはどうすればよいですか?
ServletContext context = getServletContext();
RequestDispatcher dispatcher = context.getRequestDispatcher("/thankYou.jsp");
dispatcher.forward(request,response);
ありがとうございます。
問題が解決しました。
このRequestDispatcherのrequestDispatcherのように使用して解決しました。 \t \t \t \t requestDispatcher = request.getRequestDispatcher( "/ thankYou.jsp"); \t \t \t \t requestDispatcher.forward(request、response); – kitokid