• Post Reply Bookmark Topic Watch Topic
  • New Topic

Request forward to other application

 
karimkhan pathan
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

can we forward a request from a servlet of one application to another application .

i have tried using requestDispatcher but didnt work .
can you suggest ..

Both the applications are residing on the same server .
Jboss4.0.5 is used .

Thanks in advance ,
 
Mohamed Inayath
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, One cannot use RequestDispatcher for this.

You can use sendRedirect(URL) with the HTTPServletResponse object.

It will work
 
karimkhan pathan
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but i need to have the same request and response in the second application ..
If used sendredirect then headers ,request,response will not be avialbel for the second application .

Thanks
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the same topic discussed many time...search here
 
Mohamed Inayath
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You dont have any other go.

You cant have data transferred between different context.
 
karimkhan pathan
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
seetharaman venkatasamy wrote:the same topic discussed many time...search here


can you provide link said above
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
karimkhan pathan wrote:can you provide link said above


if you want mango, you should climb the tree
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On other words, no, this is not possible.

You'll need to re-evaluate your code-sharing design.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!