This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes In how many ways we can call another servlet from the doPOST() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "In how many ways we can call another servlet from the doPOST()" Watch "In how many ways we can call another servlet from the doPOST()" New topic
Author

In how many ways we can call another servlet from the doPOST()

Bhairava Surya
Ranch Hand

Joined: Aug 19, 2007
Posts: 45
Hi All,

In how many ways can we call another servelt from the doPOST() method??

Thanks & Regards,
Ravi.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

what do you mean by 'call'?
Bhairava Surya
Ranch Hand

Joined: Aug 19, 2007
Posts: 45
How can we redirect from doPOST() of one servlet to another.
Amit ChaudhariC
Ranch Hand

Joined: Aug 06, 2009
Posts: 33
Please check RequestDispatcher API.

Regards,
amit
Bhairava Surya
Ranch Hand

Joined: Aug 19, 2007
Posts: 45
Other than RequestDispatcher is any other way
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

you could call the servlet directly

new MyServlet.doPost(request, response) - not that I'm suggesting it.

Maybe if you told us what you were trying to do it would help us provide suggestions?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: In how many ways we can call another servlet from the doPOST()
 
Similar Threads
destroy method of servlet
ways to send Jsp Error Page
can we call a doPost() inside a doGet(). ?
Ways to invoke a method of an java object?
can anyone tell me how many ways can we call an ejb from a jsp?