hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koundinya \(Sudhakar Chavali\)" <sudhakar_koundi...@yahoo.com>
Subject Re: [ANNOUNCE] Release of Commons HttpClient 2.0.2
Date Mon, 11 Oct 2004 09:44:24 GMT
Hello All,

I appreciate development of HttpClient API.

Anyhow I need to have some clarifications regarding the usage of API.

When I get some problem regarding network program, I have posted the question at
http://www.experts-exchange.com/Java - Currently I am using Java Net API and Socket code
implementation for this.

Some person suggested to use HttpClient for this.

But I get some other answer from another guy and what he says is

1. API is not stable
2. API is flaky
3. No proper documentation and easy to understand explanation
4. No proper examples provided by team to understand API.
4. Security problems may araise 
5. Takes much memory when compared with Java Net API
6. My code becomes complicated, if I use HttpCLient
7. As name it says limited to Http Protocol. - Which is not suitable for multi protocol
implementations. 

So I need some clarifications from Development team of HttpClient API.
I hope I get the Positive response from the team regarding all matters what I have mentioned
above.



Best Regards
Sudhakar.


P:S - If my question hurts any of the development team, please do not take it personal. Basically
I need you help








--- Oleg Kalnichevski <olegk@apache.org> wrote:

> Javen
> 
> HttpClient 2.0.x represents the stable branch whereas HttpClient 3.0 is
> still in ALPHA development stage and may be subject to API change. We
> are planning to freeze the 3.0 API quite soon and start working toward
> the code freeze and a first stable release 
> 
> For detailed information on new features in HttpClient 3.0 please refer
> to:
> 
> http://jakarta.apache.org/commons/httpclient/3.0/news.html
> 
> Oleg
> 
> On Mon, 2004-10-11 at 08:18, Javen Fang wrote:
> > http://jakarta.apache.org/commons/httpclient/3.0/index.html
> > 
> > But what I see the new is  3.0. 
> > 
> > what is different is 2.0 and 3.0
> > 
> > 
> > On Sun, 10 Oct 2004 23:12:15 -0700 (PDT), Srinivas Velidanda
> > <svelidanda@yahoo.com> wrote:
> > > Hi,
> > > 
> > > I have been using HttpClient version 2.0.1. But have some problems while uploading
multiple
> files. Please let me know
> > > 
> > > 1. Can I upload multiple files using httpclient api from client to server (client
and server
> running on different systems).
> > > 
> > > 2. I worked with sample code at
> > > 
> > > http://www.theserverside.com/articles/article.tss?l=HttpClient_FileUpload.
Everything works
> fine if I run the sample on the same systems but I cannot do the same by making the client
and
> server on different systems.
> > > 
> > > I used the following sample at the above url
> > > 
> > > Listing 9-6. HttpMultiPartFileUpload.java
> > > package com.commonsbook.chap9;
> > > import java.io.File;
> > > import java.io.IOException;
> > > 
> > > import org.apache.commons.httpclient.HttpClient;
> > > import org.apache.commons.httpclient.methods.MultipartPostMethod;
> > > 
> > > public class HttpMultiPartFileUpload {
> > >    private static String url =
> > >      "http://localhost:8080/HttpServerSideApp/ProcessFileUpload.jsp";
> > > 
> > >    public static void main(String[] args) throws IOException {
> > >        HttpClient client = new HttpClient();
> > >        MultipartPostMethod mPost = new MultipartPostMethod(url);
> > >        client.setConnectionTimeout(8000);
> > > 
> > >        // Send any XML file as the body of the POST request
> > >        File f1 = new File("students.xml");
> > >        File f2 = new File("academy.xml");
> > >        File f3 = new File("academyRules.xml");
> > > 
> > >        System.out.println("File1 Length = " + f1.length());
> > >        System.out.println("File2 Length = " + f2.length());
> > >        System.out.println("File3 Length = " + f3.length());
> > > 
> > >        mPost.addParameter(f1.getName(), f1);
> > >        mPost.addParameter(f2.getName(), f2);
> > >        mPost.addParameter(f3.getName(), f3);
> > > 
> > >        int statusCode1 = client.executeMethod(mPost);
> > > 
> > >        System.out.println("statusLine>>>" + mPost.getStatusLine());
> > >        mPost.releaseConnection();
> > >    }
> > > }
> > > 
> > > and for processing file upload i used the following JSP
> > > 
> > > <%@ page contentType="text/html;charset=windows-1252"%>
> > > <%@ page import="org.apache.commons.fileupload.DiskFileUpload"%>
> > > <%@ page import="org.apache.commons.fileupload.FileItem"%>
> > > <%@ page import="java.util.List"%>
> > > <%@ page import="java.util.Iterator"%>
> > > <%@ page import="java.io.File"%>
> > > html>
> > > <head>
> > > <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
> > > <title>Process File Upload</title>
> > > </head>
> > > <%
> > >        System.out.println("Content Type ="+request.getContentType());
> > > 
> > >        DiskFileUpload fu = new DiskFileUpload();
> > >        // If file size exceeds, a FileUploadException will be thrown
> > >        fu.setSizeMax(1000000);
> > > 
> > >        List fileItems = fu.parseRequest(request);
> > >        Iterator itr = fileItems.iterator();
> > > 
> > >        while(itr.hasNext()) {
> > >          FileItem fi = (FileItem)itr.next();
> > > 
> > >          //Check if not form field so as to only handle the file inputs
> > >          //else condition handles the submit button input
> > >          if(!fi.isFormField()) {
> > >            System.out.println("\nNAME: "+fi.getName());
> > >            System.out.println("SIZE: "+fi.getSize());
> > >            //System.out.println(fi.getOutputStream().toString());
> > >            File fNew= new File(application.getRealPath("/"), fi.getName());
> > > 
> > >            System.out.println(fNew.getAbsolutePath());
> > >            fi.write(fNew);
> > >          }
> > >          else {
> > >            System.out.println("Field ="+fi.getFieldName());
> > >          }
> > >        }
> > > %>
> > > <body>
> > > Upload Successful!!
> > > </body>
> > > </html>
> > > 
> > > 3. But I could not do the same by making the server and client on different
systems.
> > > 
> > > 4. Pl. let me know for the same purpose is there any patch available with current
version
> released.  i.e.2.0.2
> > > 
> > > 5. Is there a way to build Multipart request without putting the Http File
Item in the form.
> > >    i.e. dynamically getting the file Items created programmatically at client
side and
> > >    passing the Multipart request to the server
> > > 
> > > thanks,
> > > Srinivas.
> > > 
> > > 
> > > Michael Becke <becke@u.washington.edu> wrote:
> > > The Jakarta Commons team is pleased to announce the release of
> > > HttpClient 2.0.2. This release greatly improves the performance of
> > > executing methods where the response contains little or no content.
> > > Please visit the HttpClient 2.0 web site
> > > for more information on
> > > HttpClient and this release.
> > > 
> > > Thank you,
> > > 
> > > Commons HttpClient Development Team
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
> > > 
> > > 
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Tired of spam?  Yahoo! Mail has the best spam protection around
> > > http://mail.yahoo.com
> > > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
> 
> 


=====
"No one can earn a million dollars honestly."- William Jennings Bryan (1860-1925) 

"Make everything as simple as possible, but not simpler."- Albert Einstein (1879-1955)

"It is dangerous to be sincere unless you are also stupid."- George Bernard Shaw (1856-1950)


		
_______________________________
Do you Yahoo!?
Express yourself with Y! Messenger! Free. Download now. 
http://messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Mime
View raw message