Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
FooServletdoPostメソッドからBarServletdoGetメソッドに転送する必要があります。これを解決する方法はありますか?
現在、doPostからdoGetメソッドを呼び出していますが、これはベストプラクティスではないと確信しています。
Webベースでの使用を目的としたHTTPサーブレットを想定すると、サーバーのビューに関する洞察を伝えたり、意図しない再POSTを回避したりするために、ServletResponse.sendRedirect(...)からクライアント要求サービスを使用することをお勧めします。BarServlet
ServletResponse.sendRedirect(...)
BarServlet