Tuesday, 15 March 2011

java - Pass header parameters with sendRedirect URL -


How to pass the header parameters with the sendRedirect url?

I am trying to send different code to sendRedirect but I also want to give the header parameter with the request. How to do this

HTTPSvote Response. SendRedirect () sends a redirect response (302) The client then starts a new request for the client referred to in the location header. HTTP does not define a way for a server to ask the client to set a request header on a redirect resource.

To pass data to the new resource, you can set it in the query string:

To make it solid

  response .sendRedirect ("NewResource? Param1 = value1");   

New Resource

  request.getParameter ("param1");    

No comments:

Post a Comment