Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Sending a GET request as POST in response.sendRedirect  RSS feed

 
monali Potdukhe
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
I am using response.sendRedirect to send a request to a report server.
I want to send this as a POST request as I do not want to expose the Report Server URL.
Any help in this regard is greatly appriciated.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Keep in mind that a redirect sends a messge back to the client browser giving a new URL so that is not really what you want. How about forwarding the request instead?
Bill
 
carlos sanchez
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you mean <jsp:forward page="{relativeURL | <%= expression %>}" />?
I've looked up and found that inside these tags you can only specify the parameters (value pair). How do you precise the POST?
 
Nilesh Srivastava
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Does forward sends the requests in GET or POST form.
I think it is a POST form but by default (when u dont specify it) it is GET.
Again I am not sure...
Ooooopss I got confused...
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I understand it, RequestDispatcher forward(request,response) does not change the request object, so if it was a POST when you got it, it will be a POST when it gets there.
Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!