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

Issue in downloading a file through an HTTP Get in java  RSS feed

 
Deepak Amar
Greenhorn
Posts: 11
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a application which is accessible using URL : http://test:10123

And this application requires a login and used to generate reports.

So if you access the below link in browser it downloads the report with the report_id=123

http://test:10123/servlet/XXXServlet/Report123.csv?reportID=123

I have the code but unfortunately it doesn't work and the status code returned is 400. Also I don't know where I can set the user name and password which the above report generating application uses.

Please help.


 
Campbell Ritchie
Marshal
Posts: 55751
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I failed to get either of those links you posted to open. Please provide us with the correct URL.
 
Deepak Amar
Greenhorn
Posts: 11
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:I failed to get either of those links you posted to open. Please provide us with the correct URL.


I cannot post the actual URL as its confidential..
 
Paul Clapham
Sheriff
Posts: 22504
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just saying that the web page requires a user name and password isn't sufficient, because there are several ways to authenticate yourself to a web application. So you're going to have to start by finding out what kind of authentication is being used.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!