Win a copy of The Java Performance Companion this week in the Performance 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