I believe that following redirects is the default behaviour for HttpURLConnection, isn't it? So the problem may be that the servlet isn't designed to redirect to the JSP. If that's the case then your client-side component (the URLConnection) can't affect how the server side is designed to work. But you could follow up by sending a second request to the JSP.
That's speculation, though. We don't know how things are supposed to work on the server, we don't know what you are doing on the client, and we don't know what is happening that shouldn't be happening. Or vice versa.
Joined: Jul 27, 2009
hi Ulf Dittmer
can please tell me how to use setFollowRedirects(true) method.