• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trying to Redirect. 302 Error. HTTP CLIENT

 
Raihan Jamal
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's wrong with this code. I am getting error on setRedirectStrategy and HttpContext as cannot be resolved to a type. And I am trying to redirect as I am always getting 302 error. So is this the right way to do it. Any example will be appreciated..

 
Rob Spoor
Sheriff
Pie
Posts: 20611
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fix your imports. It's missing a few classes.
 
Raihan Jamal
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Rob Spoor

Edited:- Updated One

After Some modifications in my code, Now I am getting error on setRedirectStrategy as



and error on DefaultRedirectStrategy as



and If I am adding this import to resolve the DefaultDirectStrategy error than I am getting red line on this import as

and error on super as the same as above one



And I am not able to know, what is wrong in this code. Any help will be appreciated. And I am trying to redirect as I am always getting 302 error. So is this the right way to do it. Any example will be appreciated..



 
Rob Spoor
Sheriff
Pie
Posts: 20611
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DefaultRedirectStrategy is available since HttpClient 4.1. I suggest you upgrade your library.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic