This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Servlets and the fly likes Forwarding request to same servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Forwarding request to same servlet" Watch "Forwarding request to same servlet" New topic

Forwarding request to same servlet

Kripal Singh
Ranch Hand

Joined: Jul 26, 2001
Posts: 254
I am trying to forward the request to the same servlet (but different URL). E.g. when �servlet/MyServlet?p=1� is loaded it forward the request to �servlet/MyServlet�. Currently I am using the sendRedirect method but it is slow. I tried using the requestDispatcher.forward method but since it is for an external resource it not working. Something like

Is there any way I can do it that is faster then sendRedirect method.

# Help an unprivileged kid.<br /> Whatever u do will make a difference...<br /> a child's life & ur own #<br /><a href="" target="_blank" rel="nofollow"></a>
I agree. Here's the link:
subject: Forwarding request to same servlet
jQuery in Action, 3rd edition