This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Forward from one servlet to another servlet!!

 
Ravi Kumar Ravuru
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Folks,
I have two webapps on two servers.Can i forward the request,response of a servlet present in one server to the servlet present on another server.Is it Possible.Awaiting ur reply.
Regards,
Ravi
 
Rangarajan Suresh
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ravi Kumar R.S:
Hello Folks,
I have two webapps on two servers.Can i forward the request,response of a servlet present in one server to the servlet present on another server.Is it Possible.Awaiting ur reply.
Regards,
Ravi

Hi,
you can not forward the request to a servlet on a diff server,
since only relative paths are allowed in getRequestDispatcher and getContext.
Probably, you can add an alias for the servlet on the other m/c in one of the servers and forward the request to that alias.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic