This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Servlets and the fly likes File Download from URL that required posting of URL paramter. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "File Download from URL that required posting of URL paramter." Watch "File Download from URL that required posting of URL paramter." New topic
Author

File Download from URL that required posting of URL paramter.

Sunil Baboo
Greenhorn

Joined: Aug 12, 2010
Posts: 15
Some body please help to code on java using HTTPUrlConnection protocol to download file from URL which need posting of URL parameter.

In clear way,

Suppose there is an URL : www.xyz.com?fileid=123 under which file resides. But this url require post parameter: __EVENTTARGERT=123&__EVENTARGUMENT=&__VIEWSTATE=; then only file come up. Hence , scenario here is we need to post data in that url then only file come up which may be zip or pdf or doc.

From direct URL, i know file can be downloaded easily but from URL that require posting on information, i don't know how to do....so can some help me please.

Thankx in advance




Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56204
    
  13

"baboo sun", please check your private messages for an important administrative matter. Thanks.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Michael Angstadt
Ranch Hand

Joined: Jun 17, 2009
Posts: 272

POST requests store their parameters in exactly the same way that GET requests do. The only difference is that GET requests store the parameters in the URL and POST requests store the parameters in the request body.

GET
URL: http://www.example.com/index.jsp?id=123&type=jpeg+image
Body: [empty]

POST
URL: http://www.example.com/index.jsp
Body: id=123&type=jpeg+image



SCJP 6 || SCWCD 5
Sunil Baboo
Greenhorn

Joined: Aug 12, 2010
Posts: 15
SOLVED
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: File Download from URL that required posting of URL paramter.
 
Similar Threads
download and Install the lateatTomcat
ID numbers sometimes confused in JSP
URLs
Simulate a http post in java.net
Need help with authentications