This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Dear all, If I have 2 servlet, Servlet A and Servlet B. Assume that JSP page sent request to Servlet A using POST method.... Code in servlet A public class Servlet A extends HttpServlet { public void doPost(HttpServletRequest req, HttpServletResponse res) { String path= "/ServletB?count=5"; RequestDispatcher rd = req.getRequestDispatcher(path); rd.include(req, res); } } and code in servlet B public class ServletB extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse res) { .... // do something } public void doPost(HttpServletRequest req, HttpServletResponse res) { .... // do something } } In servlet B, what method will be called by web container when received request from servlet A? doPost() or doGet()... ? thanks daniel
Mark Howard
Ranch Hand
Joined: Feb 14, 2001
Posts: 285
posted
0
doPost(). The HTTP method that triggered the original request is preserved.
suneel kanth
Greenhorn
Joined: Feb 06, 2003
Posts: 22
posted
0
doPost() method of the servletB going to be called.If you keep your code in doGet() corresponding doGet() method of servletB will call.
Any sufficiently advanced bug is indistinguishable from a feature.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.