"I want to send some parameters to a servlet which is in different web application"
I am sorry, gone through many threads on this but in most of them are given solutions to share data in the same application using headers/request attributes etc.
So please give me a solution how it is possible between web applications.
Here how am trying now...
In Application1 , Servlet 1 :
response.setHeader("Key","value");
response.sendRedirect("New Application URL");
In Applicatino2, Servlet 2:
request.getHeader("key")
But it is not giving the header which am sending.
So please let me know where am wrong help in this.
thanks in advance.
So servlet 1 calls servlet 2; should the output of servlet 2 go back to the browser, or should servlet 1 do something with the output of servlet 2 and then send a response back to the browser?
A client-side redirect causes a 2nd request from the browser to the 2nd server - with a new set of headers that are unrelated to the headers used in the 1st request. You may wish to read up on HTTP's request/response mechanism and how a client-side redirect works in your favorite servlet/JSP book/tutorial.
If this mechanism is a client side redirection does sent new set of request,response then ok ...my headers are not sent. Then please tell me is there any other way to send set of parameters as part of HTTP etc.