I need to forward from my FooServlet doPost method to BarServlet doGet method. Is there a way to solve this?
Currently I'm calling the doGet method from my doPost but I'm sure that this isn't the best practice.
假设HTTP servlet用于基于Web的使用,我建议使用ServletResponse.sendRedirect(...)
来从BarServlet
客户端请求服务,以便传达对服务器对事物的看法的一些见解,并避免意外的重新POST , 等等。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.