On 24 March 2011 20:59, Alec Swan <[email protected]> wrote: > Hello, > > We have a servlet which generates a report and allows user to download > it as a CSV file. The servlet is deployed on Tomcat and secured using > form authentication. > > We would like to to invoke the servlet and download the file > programmatically using Apache Commons HttpClient API. Could anybody
Commons HttpClient is legacy code - please consider using HttpComponents HttpClient. > provide advice or code sample showing how to get HttpClient request > through form authentication? > > Any help would be greatly appreciated. Have you had a look at the HttpComponents web-site? http://hc.apache.org/ There's plenty of documentation there. If you must use Commons HttpClient: http://svn.apache.org/viewvc/httpcomponents/oac.hc3x/trunk/src/examples/ Otherwise, HC HttpClient: http://hc.apache.org/httpcomponents-client-ga/examples.html Both URLs have examples of form login. > Thanks > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
