• Post Reply Bookmark Topic Watch Topic
  • New Topic

Request Dispatcher

 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no no Wenting it is just about A to B and back to A thats it.
 
Nidhi Singhal
Ranch Hand
Posts: 89
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot..
 
Nidhi Singhal
Ranch Hand
Posts: 89
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i am using request dispatcher - forward to forward my request from one servlet to another...now afer doing some processing on the second servlet...i want to forward the results back to the first...
is it possible to use the request dispatcher-forward again to forward the req from 2nd servlet to the first... or is there some other way out??

thanks..

Nidhi
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah, dont use forward(). use RequestDispatcher.include() instead.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the request dispatcher couldn't care less where you forward to, it just follows orders and does its thing.

You will have to be careful about circular references of course.
If A forwards to B, B to A, and A to B again you could be in trouble unless the loop is broken somewhere
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!