File upload with jakarta common upload package

i got the code f file upload from the forum but it is not working and giving some errors . I am attaching the code iam using and the stack trace of the errors i am getting . Please if somebody can help me ............
<html>
<form method="post" action="/servlet/UploadFile" enctype="multipart/form-data">
Name
<input type="text" name="uname"/>
File
<input type="file" name="upfile"/>
<input type="submit"/>
</form>
</html>
and the servlet handling the request is as import java.io.File;
import java.io.IOException;
import java.util.Iterator;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.fileupload.DiskFileUpload;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.FileUpload;
import org.apache.commons.fileupload.FileUploadException;
* @author sm23772
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
public class UploadFile extends HttpServlet {
public void doPost(HttpServletRequest req,HttpServletResponse res)
public class UploadFile extends HttpServlet {
public void doPost(HttpServletRequest req,HttpServletResponse res)
try{
FileUpload fup=new FileUpload();
boolean isMultipart = FileUpload.isMultipartContent(req);
// Create a new file upload handler
System.out.println(isMultipart);
DiskFileUpload upload = new DiskFileUpload();
// Parse the request
List /* FileItem */ items = upload.parseRequest(req);
Iterator iter = items.iterator();
while (iter.hasNext()) {
FileItem item = (FileItem) iter.next();
if (item.isFormField()) {
System.out.println("its a field");
} else {
System.out.println("its a file");
System.out.println(item.getName());
File cfile=new File(item.getName());
File tosave=new File(getServletContext().getRealPath("/"),cfile.getName());
}catch(Exception e){System.out.println(e);}
the exception arising are
as ..........
exception
javax.servlet.ServletException: Cannot allocate servlet instance for path /servlet/UploadFile
     org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:389)
     org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:170)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileUpload
     java.lang.Class.getDeclaredConstructors0(Native Method)
     java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
     java.lang.Class.getConstructor0(Class.java:2640)
     java.lang.Class.newInstance0(Class.java:321)
     java.lang.Class.newInstance(Class.java:303)
     org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:370)
     org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:170)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileUpload
this is your error
you need to have commons-fileupload-1.2.jar in your classpath
you can download it from http://jakarta.apache.org/site/downloads/downloads_commons-fileupload.cgi

Similar Messages

  • Java.io.File vs. Jakarta Commons Upload

    Does anyone know what the difference is between using Jakarta Commons Upload functionality vs. using Java's File API? It seems I could simply use Java's API with the same results. Is there some major difference between the two that I'm missing?

    Does anyone know what the difference is between using
    Jakarta Commons Upload functionality vs. using Java's
    File API? It seems I could simply use Java's API
    with the same results. Is there some major
    difference between the two that I'm missing?I guess one's to upload files using a servlet while the other one's for modelling a path in the local file system...
    About the difference between a parking lot and the car in your driveway.

  • File size with Jakarta Commons FileUpload

    Hello fella experts,
    I am using the org.apache.commons.FileUpload package to upload a file via a servlet.
    I'm implementing the DiskFileUpload() method in the servlet.
    My problem is that I want to apply a file-size validation and specify that files with size greater than 1MB should not be uploaded.
    How to accomplish this ?
    Any suggessions ?
    Thanx in advance.

    Hi, I'm trying this code, and it works pretty fine, but when I try to transfer a .zip file, it give me a .zip file that I can't extract.
    Please.. Am I doing something wrong, do I miss something??
    I set already the File Type to binary...
    any comments..
    public static void copyFiles(String server, String user, String pwd, String origen, String destino)
    try {
    FTPClient ftp = new FTPClient();
    ftp.connect(server);
    ftp.login(user,pwd);
    ftp.setFileType(ftp.BINARY_FILE_TYPE);     
    //ftp.enterLocalPassiveMode();
    ftp.changeWorkingDirectory(origen);
    int reply = ftp.getReplyCode();
    if(!FTPReply.isPositiveCompletion(reply)) {
    ftp.disconnect();
    FTPFile[] files = ftp.listFiles();
    FTPFile ftpfile = null;
    OutputStream output = null;
    for (int i = 0; i < files.length; i++) {
    ftpfile = files;
    if (ftpfile.isFile()){
    output = new FileOutputStream(new File(destino+ftpfile.getName()));
    if (ftp.retrieveFile(ftpfile.getName(),output)){
    output.close();
    ftp.logout();
    ftp.disconnect();
    } catch (Exception e) {
    e.printStackTrace();
    System.out.println("Error : " + e.toString());

  • Threading problem during File Upload with Apache faces upload tag

    First I am going to tell you "My Understanding of how JSF Apache Upload works, Correct me if i am wrong".
    1) Restores View (to show Input box and Browse button to facilitate users to select a file for upload)
    2) Translates Request Parameters to Component Values (Creates equivalent components to update them with request values).
    3) Validates Input(Checks to see whether the User has input the correct file)
    4) Updates Backing Bean or Model to reflect the values.
    5) Renders response to user.
    I am uploading huge files of sizes 400MB and above with the help of JSF apache extensions tag
    <h:form id="uploadForm" enctype="multipart/form-data">
    <x:inputFileUpload style="height:20px;" id="upload" value="#{backingbean.fileContents}" storage="file" size="50" />
    </h:form>
    In the backing bean
    private UploadedFile fileContents;
         public UploadedFile getFileContents() {
              return fileContents;
         public void setFileContents(UploadedFile fileContents) {
              System.out.println("File being uploaded...");
              this.fileContents = fileContents;
    Since, the file size is so huge, I am using temp folder to use for the apache tag instead of memory.
    In web.xml i am using like this
    <filter>
    <filter-name>ExtensionsFilter</filter-name>
    <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
    <init-param>
    <param-name>uploadMaxFileSize</param-name>
    <param-value>600m</param-value>
    </init-param>
    <init-param>
    <param-name>uploadThresholdSize</param-name>
    <param-value>10m</param-value>
    </init-param>
         <init-param>
    <param-name>uploadRepositoryPath</param-name>
    <param-value>/uploadfolder/</param-value>
    </init-param>
    </filter>
    <filter-mapping>
    <filter-name>ExtensionsFilter</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>
    The upload process is working perfectly fine.
    Now coming to the problem:
    Suppose one user is logging into the application & uploading say 400MB of files.
    Until these files are linked to the model objects as my understanding of step 2, if second user tries to open the application he gets stuck with the loading page.
    The page gets loaded only after the request files are linked to the component values(Step 2 above) and updates the backing bean's values.
    I don't see any error in the logs. User is getting stuck. The user is getting stuck only when uploading the files. The other operations like searching are not blocking any other activities performed by the user.
    Server used: IBM Application Server V6.0. CPU is normal, memory usage is normal.

    Dear friend,
    i am also trying to upload using the common file upload.
    when try to run the file error is coming
    can give some suggestion.
    can i use if concurrent user file upload at a time

  • Problem with jakarta commons email

    i am using in addition to the javamail libary the jakarta commons libary.
    do anyone of you havee anyxpieriences with this libary??
    here is my code for send a simple mail:
    String host=null;
            SimpleEmail email = new SimpleEmail();
            try {
                 host=DbJdbc.getSetting("SmptHost");
                try {
                    email.setHostName(host);
                    email.addTo(emailadress);
                   email.setFrom("[email protected]");
                    email.setSubject("Ears mail scheduler");
                    email.setMsg("test");
                    email.setAuthentication("test","test");
                    email.send();
                } catch (EmailException eex) {
                LoggerLars.log("[SendMail] : Error" + eex.getMessage(),4);
                throw new Exception(eex.getMessage());
            } catch  (Exception ex) {
                LoggerLars.log("[SendMail] Exception in Sendmail: "+ex.getMessage(),4);  
         }i am working with the bea weblogic 8.1.3 and i get an error that the catch parameter is not an java.lang.throwable.
    so the try/catch construct doesn't work....did anyone got the same problem?? i don't see any programming fault in the code, i simple copied is from the jakarta websites howto.

    problem solved!!!
    i just had to restart bea und to update the libaries!! thx

  • Uploading with cyberduck it uploads both sites i'm working on want just one

    Thanks to all the people who have helped me so far. My site is now live! V exciting for me!
    This may be a simple q but I cannot seem to find out so far.
    When I upload site A with cyberduck, it is taking site B with it and putting them together as one website.
    I am working on the two sites separately in iWeb and I don't want them as one website.
    Any ideas? Thanks

    when you upload to your domain with cyberduck are you uploading everything that you get from iweb? iweb will publish one folder for each site. you should then only upload one folder.
    you might want to consider splitting your domain file:
    http://karreth.com/iweb/Domain%20File%20Is%20Everything!%20Backup%20Now!.html
    http://web.mac.com/varkgirl/iWeb/iWebFAQ/FAQ%20Home/9EC95C22-8561-4ED7-AC73-571D 97E7FF8F.html
    max

  • Uploading a file to server using servlet (Without using Jakarta Commons)

    Hi,
    I was trying to upload a file to server using servlet, but i need to do that without the help of anyother API packages like Jakarta Commons Upload. If any class for retrieval is necessary, how can i write my own code to upload from client machine?.
    From
    Velu

    <p>Why put such a restriction on the solution? Whats wrong about using that library?
    The uploading bit is easy - you put a <input type="file"> component on the form, and set it to be method="post" and enctype="multipart/form-data"
    Reading the input stream at the other end - thats harder - which is why they wrote a library for it. </p>
    why i gave the restriction is that, i have a question that <code>'can't we implement the same upload'</code>
    I was with the view that the same can be implemented by our own code right?

  • Problems with Apache Commons FileUpload

    I'm completely stymied here. I've been trying to get the Apache Commons FileUpload working with a JBoss 4.2 server, and having no luck whatsoever. The servlet is listed out here:
    package com.areteinc.servlets;
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.util.Iterator;
    import java.util.List;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.commons.fileupload.FileItem;
    import org.apache.commons.fileupload.FileItemFactory;
    import org.apache.commons.fileupload.FileUploadException;
    import org.apache.commons.fileupload.disk.DiskFileItemFactory;
    import org.apache.commons.fileupload.servlet.ServletFileUpload;
    import org.apache.log4j.Level;
    import org.apache.log4j.Logger;
    public class Filer extends HttpServlet {
         private Logger logger = Logger.getLogger(Filer.class);
         public Filer() {
              logger.setLevel(Level.DEBUG);
         protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
              logger.debug("Serving up a GET page...");
              PrintWriter writer = resp.getWriter();
              StringBuffer response = new StringBuffer();
              response.append("<HTML><HEAD><TITLE>JENA File Uploader</TITLE></HEAD><BODY>");
              response.append("<FORM action=\"Filer\" method=\"POST\" enctype=\"multipart/form-data\">");
              response.append("Upload file: <input type=\"file\" name=\"file1\"/><br>");
              response.append("Upload file: <input type=\"file\" name=\"file2\"/><br>");
              response.append("<input type=submit value=\"Start upload\">");
              response.append("</BODY>");
              writer.println(response);
         protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
              // First see if someone is uploading more than one file at a time...
              boolean isMultipart = ServletFileUpload.isMultipartContent(req);
              logger.debug("Received a POST request.  Multipart is flagged as " + isMultipart);
              // Create a factory for disk-based file items
              FileItemFactory factory = new DiskFileItemFactory();
              // Create a new file upload handler
              ServletFileUpload upload = new ServletFileUpload(factory);
              // Parse the request
              try {
                   List<FileItem> items = upload.parseRequest(req);
                   Iterator itr = items.iterator();
                   logger.debug("Size of upload is " + items.size() + " items.");
                   while(itr.hasNext()) {
                        FileItem item = (FileItem) itr.next();
                        logger.debug("Filename is " + item.getName());
              } catch (FileUploadException e) {
                   e.printStackTrace();
    }When run, I hit it with a get operation, and get the form. When I put in 2 forms (in reality, all i want to do is use one, but I'm tinkering), I see nothing in items list...
    Run, with 2 files selected to upload:
    13:50:15,421 DEBUG [Filer] Received a POST request. Multipart is flagged as true
    13:50:15,421 DEBUG [Filer] Size of upload is 0 items.
    I've tried variation after variation after variation, and it jst doesn't work. I'm using commons-fileupload-1.2.1.
    Help! :)

    On the client side, the client's browser must support form-based upload. Most modern browsers do, but there's no guarantee. For your case,
    The servlet can use the GET method parameters to decide what to do with the upload while the POST body of the request contains the file data to parse.
    When the user clicks the "Upload" button, the client browser locates the local file and sends it using HTTP POST, encoded using the MIME-type multipart/form-data. When it reaches your servlet, your servlet must process the POST data in order to extract the encoded file. You can learn all about this format in RFC 1867.
    Unfortunately, there is no method in the Servlet API to do this. Fortunately, there are a number of libraries available that do. Some of these assume that you will be writing the file to disk; others return the data as an InputStream.
    Jason Hunter's MultipartRequest (available from [http://www.servlets.com/])
    Apache Jakarta Commons Upload (package org.apache.commons.upload) "makes it easy to add robust, high-performance, file upload capability to your servlets and web applications"
    *CParseRFC1867 (available from [http://www.servletcentral.com/]).
    *HttpMultiPartParser by Anil Hemrajani, at the isavvix Code Exchange
    *There is a multipart/form parser availailable from Anders Kristensen ([http://www-uk.hpl.hp.com/people/ak/java/] at [http://www-uk.hpl.hp.com/people/ak/java/#utils].
    *JavaMail also has MIME-parsing routines (see the Purple Servlet References).
    *Jun Inamori has written a class called org.apache.tomcat.request.ParseMime which is available in the Tomcat CVS tree.
    *JSPSmart has a free set of JSP for doing file upload and download.
    *UploadBean by JavaZoom claims to handle most of the hassle of uploading for you, including writing to disk or memory.
    There's an Upload Tag in dotJ
    Once you process the form-data stream into the uploaded file, you can then either write it to disk, write it to a database, or process it as an InputStream, depending on your needs. See How can I access or create a file or folder in the current directory from inside a servlet? and other questions in the Servlets:Files Topic for information on writing files from a Servlet.
    Please note: that you can't access a file on the client system directly from a servlet; that would be a huge security hole. You have to ask the user for permission, and currently form-based upload is the only way to do that.
    I still have doubt if all the moentioned resources are alive or not

  • Apache Jakarta Commons FileUpload misleading message

    I have a JSP page doing file upload using commons FileUpload package. The code looks like this:
    <%
    DiskFileUpload upload = new DiskFileUpload();
    List items = upload.parseRequest(request);
    Iterator itr = items.iterator();
    while(itr.hasNext()) {
         FileItem item = (FileItem) itr.next();
         // check if the current item is a form field or an uploaded file
         if(item.isFormField()) {
              String fieldName = item.getFieldName();
              if(fieldName.equals("name"))
                   request.setAttribute("msg", "Thank You: " + item.getString());
         } else {
              File fullFile = new File(item.getName());
              File savedFile = new File("c:\\tmp\\",     fullFile.getName());
              item.write(savedFile);
    %>
    The JSP successfully uploaded the files but it still show me HTTP Status 404 - c:\tmp (Access is denied).
    What's wrong with my code? Thank you.

    I just found out that the problem that I have mentioned in my previous post has nothing to do with Jakarta Commons Fileupload. It happens whenever I try throwing an exception. And it happens only when I use Internet Explorer
    Thanks,
    Joe
    See the code below...
    /**** throw-error.jsp ***/
    <%@ page language="java" session="false" isErrorPage="false" errorPage="catch-error.jsp" %>
    <%
    throw new Exception("Catch this!");
    %>
    /****** catch-error.jsp ****/
    <%@ page language="java" session="false" isErrorPage="true" %>
    <html>
    <head>
    </head>
    <body>
    <%
    out.println(exception.getMessage());
    %>
    </body>
    </html>

  • Jakarta Commons FileUpload ; Internet Explorer Problem

    Hi all,
    Environment:
    Tomcat 5 ;Apache 2; JDK 1.5.0; Jakarta Commons Fileupload 1.0
    OS: Windoze XP
    Previously I've used jakarta commons fileupload package to succussfully to upload a file.
    However, I am trying to check the content type of the file and throw an exception if its not a jpeg file. The following code works great when I use firefox. But it fails when I use Internet Explorer!
    When I supply an existing jpg file on my desktop as the input to the HTML form, the code works fine. However if I enter a non-existing jpg filename, I get a "HTTP 500 Internal Server Error"! I expect to get the "Wrong content type!" message (which my JSP throws as an exception and should be caught by the error page). This problem happens only with Internet Explorer. With firefox, I get the "Wrong Content Type" message as expected.
    What could be the problem? Please advise.
    Thanks
    Joe.
    Code follows......
    /************** file-upload.html *************/
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>File Upload</title>
    <script type="text/javascript" language="JavaScript">
    <!--
    function fileTypeCheck() {
         var fileName = document.uploadForm.pic.value;
         if (fileName == "") {
              alert ("Please select a file to upload!");
              return false;
         var indexOfExt = fileName.lastIndexOf (".");
         if (indexOfExt < 0) {
              alert('You can only upload a .jpg/.jpeg/.gif file!');
              return false;
         var ext = fileName.substring(indexOfExt);
         ext = ext.toLowerCase();
         if (ext != '.jpg' && ext != 'jpeg') {
             alert('You selected a ' + ext + ' file;  Please select a .jpg/.jpeg file instead!');
              return false;
         return true;
    //--></script>
    </head>
    <form action="uploadPhoto.jsp" enctype="multipart/form-data" method="post" name="uploadForm" onSubmit="return fileTypeCheck();">
         <input type="file" accept="image/jpeg,image/gif" name="pic" size="50" />
         <br />
         <input type="submit" value="Send" />
    </form>
    <body>
    </body>
    </html>
    /*************** photoUpload.jsp **************/
    <%@ page language="java" session="false" import="org.apache.commons.fileupload.*, java.util.*" isErrorPage="false" errorPage="uploadPhotoError.jsp" %>
    <%!
    public void processUploadedFile(FileItem item, ServletResponse response) throws Exception {
         try {
              // Process a file upload
                  String contentType = item.getContentType();
              if (! contentType.equals("image/jpeg") && ! contentType.equals("image/pjpeg")) {
                   throw new FileUploadException("Wrong content type!");
         } catch (Exception ex) {
              throw ex;
    %>
    <%
    // Check that we have a file upload requeste
    boolean isMultipart = FileUpload.isMultipartContent(request);
    // Create a new file upload handler
    DiskFileUpload upload = new DiskFileUpload();
    // Parse the request
    List /* FileItem */ items = upload.parseRequest(request);
    // Process the uploaded items
    Iterator iter = items.iterator();
    while (iter.hasNext()) {
        FileItem item = (FileItem) iter.next();
        if (! item.isFormField()) {
            processUploadedFile(item, response);
    %>
    <html>
    <head>
    </head>
    <body>
    File uploaded succesfully! Thank you!
    </body>
    </html>
    /******** uploadPhotoError.jsp ****/
    <%@ page language="java" session="false" isErrorPage="true" %>
    <html>
    <head>
    </head>
    <body>
    <%
    out.println(exception.getMessage());
    %>
    </body>
    </html>

    I just found out that the problem that I have mentioned in my previous post has nothing to do with Jakarta Commons Fileupload. It happens whenever I try throwing an exception. And it happens only when I use Internet Explorer
    Thanks,
    Joe
    See the code below...
    /**** throw-error.jsp ***/
    <%@ page language="java" session="false" isErrorPage="false" errorPage="catch-error.jsp" %>
    <%
    throw new Exception("Catch this!");
    %>
    /****** catch-error.jsp ****/
    <%@ page language="java" session="false" isErrorPage="true" %>
    <html>
    <head>
    </head>
    <body>
    <%
    out.println(exception.getMessage());
    %>
    </body>

  • Trying a comprehensive jakarta-commons PKGBUILD....

    Hey there!
    I would like to build a PKGBUILD for a nice java banking program. On the way to a Arch-conform PKGBUILD I stumbled over the Java Package Guidelines and investigated the libs which are shipped with the program a bit further.
    There I found that some jars from the jakarta commons package were used but not yet packaged in AUR or the official repos. So first I wanted to build them separately, but then I found that it would make more sense to have one comprehensive package of (currently) 30MB instead of 33 single packages.
    What do you think about the idea? I am willing to support this meta package as well as the single ones if I just knew how the implementation would be more sensible.
    Since it would be a huge amount of work to pack every packag on its own, I wrote a PKGBUILD for all packages that are in Jakarta Commons.
    I hope, if it is generally desired to have any package in a single file, that I at least learnt a bit from writing this PKGBUILD
    # Contributor: jakob
    pkgname=jakarta-commons-all
    pkgver=1.0
    pkgrel=1
    pkgdesc="This packag includes all Jakarta Commons Proper packages."
    url="http://jakarta.apache.org/commons/"
    license="APACHE"
    depends=()
    makedepends=()
    conflicts=()
    source=(http://www.apache.org/dist/jakarta/commons/attributes/binaries/commons-attributes-2.2.tar.gz
    http://www.apache.org/dist/jakarta/commons/beanutils/binaries/commons-beanutils-1.7.0.tar.gz
    http://www.apache.org/dist/jakarta/commons/betwixt/binaries/commons-betwixt-0.7.tar.gz
    http://www.apache.org/dist/jakarta/commons/chain/binaries/commons-chain-1.1.tar.gz
    http://www.apache.org/dist/jakarta/commons/cli/binaries/cli-1.0.tar.gz
    http://www.apache.org/dist/jakarta/commons/codec/binaries/commons-codec-1.3.tar.gz
    http://www.apache.org/dist/jakarta/commons/collections/binaries/commons-collections-3.2.tar.gz
    http://www.apache.org/dist/jakarta/commons/configuration/binaries/commons-configuration-1.2.tar.gz
    http://www.apache.org/dist/jakarta/commons/daemon/binaries/commons-daemon-1.0.1.tar.gz
    http://www.apache.org/dist/jakarta/commons/dbcp/binaries/commons-dbcp-1.2.1.tar.gz
    http://www.apache.org/dist/jakarta/commons/dbutils/binaries/commons-dbutils-1.0.tar.gz
    http://www.apache.org/dist/jakarta/commons/digester/binaries/commons-digester-1.7.tar.gz
    http://www.apache.org/dist/jakarta/commons/discovery/binaries/commons-discovery-0.2.tar.gz
    http://www.apache.org/dist/jakarta/commons/el/binaries/commons-el-1.0.tar.gz
    http://www.apache.org/dist/jakarta/commons/email/binaries/commons-email-1.0.tar.gz
    http://www.apache.org/dist/jakarta/commons/fileupload/binaries/commons-fileupload-1.1.1.tar.gz
    http://www.apache.org/dist/jakarta/commons/httpclient/binary/commons-httpclient-3.0.1.tar.gz
    http://www.apache.org/dist/jakarta/commons/io/binaries/commons-io-1.2.tar.gz
    http://www.apache.org/dist/jakarta/commons/jelly/binaries/commons-jelly-1.0.tar.gz
    http://www.apache.org/dist/jakarta/commons/jexl/binaries/commons-jexl-1.1.tar.gz
    http://www.apache.org/dist/jakarta/commons/jxpath/binaries/commons-jxpath-1.2.tar.gz
    http://www.apache.org/dist/jakarta/commons/lang/binaries/commons-lang-2.2.tar.gz
    http://www.apache.org/dist/jakarta/commons/latka/binaries/latka-1.0-alpha1.zip
    http://www.apache.org/dist/jakarta/commons/launcher/binaries/commons-launcher-1.1.tar.gz
    http://www.apache.org/dist/jakarta/commons/logging/binaries/commons-logging-1.1.tar.gz
    http://www.apache.org/dist/jakarta/commons/math/binaries/commons-math-1.1.tar.gz
    http://www.apache.org/dist/jakarta/commons/modeler/binaries/commons-modeler-2.0.tar.gz
    http://www.apache.org/dist/jakarta/commons/net/binaries/commons-net-1.4.1.tar.gz
    http://www.apache.org/dist/jakarta/commons/pool/binaries/commons-pool-1.3.tar.gz
    http://www.apache.org/dist/jakarta/commons/primitives/binaries/commons-primitives-1.0.tar.gz
    http://www.apache.org/dist/jakarta/commons/scxml/binaries/commons-scxml-0.5.tar.gz
    http://www.apache.org/dist/jakarta/commons/transaction/binaries/commons-transaction-1.1.tgz
    http://www.apache.org/dist/jakarta/commons/validator/binaries/commons-validator-1.3.0.tar.gz)
    md5sums=('47d037449aa38b6c8e181abcfaf36b2b' 'd1571ce9d6ec3d1795364cc44f3d116e'
    '707af78be5ed2518dd2eada9afefb238' 'e688f648a5fd324f591669ca70ebe96d'
    '6c28bdee998fe4d9e76c7cf40e7f4691' 'aad3948be13476d9599cadaf146bc92a'
    '030a1c1d08f47a6c9be000fc611714b4' '6c8bc440de20b7c9b5b3b5315d50316b'
    '591fceeb4feab1094a78c9c5decd8cca' 'd333fc11abb532be2487338cb452b583'
    'b437ea809d320378fc05af9f29e2636f' '717239578dfcd05bde0dfd1d3e8f319f'
    '2273f5f83a477f4f18fccf3a00e2b48c' 'fb856b9689bdc4c52f8ae999057f89fc'
    '4fb252cd4bcee57b573937e3c88974cc' '3b851898d3347cd4d6890b79c9a8a0f0'
    '58167f247e8f8ad8fb1def97c1de8f07' '52b42b61593def482dc968ffdd27f113'
    'e9e3ba84a214d2bcf96aa31b24f3bb5f' '9bdf02d9b659a70b7f327c923c1f4d80'
    '1730dae5f0ef0594a47ead5d1a4ac41b' '4f683f7b6970babb8c9f09bb12b7c1a6'
    'fbf479099aa252989fe4c81511abf4bf' '7ed65e08e8c952c4d9f6db0d73ef5426'
    'c2bd7cc1fa08d78ec5aa80632c21152b' '37c43d1d0c08c1b753a7bf952c763eb3'
    'ba74fdf4aca98f01579eca11acc6d882' '577e90cc40328c287acc921dae344c12'
    '1bdae6c015689349b704daebda924a5b' '2ce92656204f2fa63dad6dfa88e1458b'
    '091e2dc0efcb9155c2b4a05792d49a77' 'fe946d1775d58ded6050dec6af648f38'
    '221d924fb85f3597d8be0708d45f0f5a')
    build() {
    mkdir -p $startdir/pkg/usr/share/java/jakarta-commons
    cd $startdir/src/
    rm -rf *gz docs LICENSE*
    mv *.txt doc
    mv * $startdir/pkg/usr/share/java/jakarta-commons
    Since there are sometimes when copy&pasting PKGBUILDS (especially the ""s, IIRC), here a link to a pastebin
    My questions are: Are the jars to be put in /usr/share/java/jakarta-commons/$package/*.jar or plainly under jakarta-commons?
    Is it ok to delete all the docs, licenses + readmes?
    Sorry but it's very late now so I'll stop here and wait for your suggestions and tips, which will come hopefully..
    Greetings and good night,
    jakob

    Your absolutely right saying that never all commons packages would be used by just one program.
    I read the Java Packaging Guidelines again and it says that only commoly used and major libs should be sourced out to single packages. So the question is: Do any other packages in AUR or the official repos use some of the jakarta-commons projects so it would eventually pay to make single packages for them, or isn't it worth the hussle?
    I for my part now will leave the libs that are bundled with the package I wanted to upload at first in the package and use them.
    Thanks for your reply

  • Apache Jakarta Commons Logging

    Hi guys,
    I found this note in the log4j.properties file. Could you expand this note by just a little to
    explain where to put the file so that its settings are found and used? That would be a lot more
    user friendly than sending someone off to another site to figure this out.
    Thanks,
    David Ezzio
    # This is a configuration file for using log4j with Kodo logging.
    # For details about log4j configuration, see:
    # http://jakarta.apache.org/log4j/docs/index.html

    Hi Marc,
    Well, now I know I'm confused. Which one does Kodo 2.4.0 use, log4j or AJCL or are they the same?
    Does the log4j.properties file control Kodo's logging?
    David
    Marc Prud'hommeaux wrote:
    >
    David-
    If log4j.properties file is located anywhere in the root of one of the
    elements in your CLASSPATH, then it will be used. Log4J has a myriad of
    different options (as does the Jakarta Commons logging package), so this
    can be tuned to your specific needs.
    In article <[email protected]>, David Ezzio wrote:
    Hi guys,
    I found this note in the log4j.properties file. Could you expand this note by just a little to
    explain where to put the file so that its settings are found and used? That would be a lot more
    user friendly than sending someone off to another site to figure this out.
    Thanks,
    David Ezzio
    # This is a configuration file for using log4j with Kodo logging.
    # For details about log4j configuration, see:
    # http://jakarta.apache.org/log4j/docs/index.html
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Jakarta Commons Lang 1.01 vs. 2.0?

    I looked through the newsgroup, but didn't see this question come up.
    Currently, the latest version of the Jakarta Commons Lang package is 2.0,
    though Kodo 3.2.4 includes 1.0.1. Are there any known problems or
    incompatibilities with using Lang 2.0 with Kodo 3.2.4? We'd like to only
    include the Lang 2.0 package in our application.
    Also, the link in the documentation (Appendix F) to the Jakarta pages are
    broken:
    http://jakarta.apache.org/commons/collections.html should be
    http://jakarta.apache.org/commons/collections/
    http://jakarta.apache.org/commons/lang.html should be
    http://jakarta.apache.org/commons/lang/
    and
    http://jakarta.apache.org/commons/pool.html should be
    http://jakarta.apache.org/commons/pool/
    (basically, replace the .html with a /).
    ;ted

    There are no known incompatibilities, but in Kodo 3, we're actually
    repackaging all our open-source dependencies to get away from random
    appearances of incompatibilities.
    -Patrick
    Ted M. Young wrote:
    I looked through the newsgroup, but didn't see this question come up.
    Currently, the latest version of the Jakarta Commons Lang package is 2.0,
    though Kodo 3.2.4 includes 1.0.1. Are there any known problems or
    incompatibilities with using Lang 2.0 with Kodo 3.2.4? We'd like to only
    include the Lang 2.0 package in our application.
    Also, the link in the documentation (Appendix F) to the Jakarta pages are
    broken:
    http://jakarta.apache.org/commons/collections.html should be
    http://jakarta.apache.org/commons/collections/
    http://jakarta.apache.org/commons/lang.html should be
    http://jakarta.apache.org/commons/lang/
    and
    http://jakarta.apache.org/commons/pool.html should be
    http://jakarta.apache.org/commons/pool/
    (basically, replace the .html with a /).
    ;ted

  • Jakarta Commons -- File Upload does not work with Application Server

    Hi ALl,
    I tried Jakarta Commons file upload. In the netbeans, I copied the common jar files "commons-io-1.2.jar" and "commons-fileupload-1.1.1.jar" in the
    netbeans-5.5\enterprise3\apache-tomcat-5.5.17\common\lib and set the class paths. It is working correctly when I compile and run from the netbeans. However, when I deployed in Sun Application Server PE 9.0, I am receiving the following errors. In Sun application I copied the above jars files to "C:\Sun\AppServer\jdk\jre\lib\ext"..
    I have read in several postings that it does not work this way but could find any solution. Any idea will be greatly appreciated.
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:930)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:863)
         org.apache.jsp.fileUpload_jsp._jspService(fileUpload_jsp.java:109)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:353)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:409)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:317)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
         com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
         org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
         com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
         com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
         com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
         com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
         com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
         com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
         com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    root cause
    java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream
         org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:116)
         org.apache.jsp.fileUpload_jsp._jspService(fileUpload_jsp.java:76)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:353)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:409)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:317)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
         com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
         org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
         com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
         com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
         com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
         com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
         com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
         com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
         com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    note The full stack trace of the root cause is available in the Sun Java System Application Server Platform Edition 9.0 logs.
    Sun Java System Application Server Platform Edition 9.0
    Thank you,
    --Sam                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi All,
    I solved this few minutes after I posted this question. Thought I should share with everybody, just in case some one else need it.
    I copied these three files in the folder C:\Sun\AppServer\jdk\jre\lib\ext
    1. servelet-api.jar
    2. commons-io-1.2.jar
    3. commons-fileupload-1.1.1.jar
    No need to set any class path.
    Thanks

  • Upload file in Portlet (JSR-168) with library commons-FileUpdate

    hi All,
    I have write portlet (JSR 168) "UpToFile.java" for upload a file with the Commons-FileUpload 1.1.1 but when deploy in the Oracle Portal the file is not upload, because the variable isMultipart is false:
    UPToFile.ProcessAction(...) :
    boolean isMultipart = PortletFileUpload.isMultipartContent(request);
    (Utility method that determines whether the request contains multipart content.)
    view.jsp:
    <FORM ACTION="<portlet:actionURL/>" METHOD="POST" enctype="multipart/form-data" >
    upload file: <INPUT TYPE="file" NAME="file-upload" SIZE="20">
    <INPUT TYPE="SUBMIT" value="upload" >
    </FORM>
    I do not understand because "isMultipart" is "false".
    Tanks.
    EDIT: sorry, now work. :)
    Message was edited by:
    dartan
    null

    hi All,
    I have write portlet (JSR 168) "UpToFile.java" for upload a file with the Commons-FileUpload 1.1.1 but when deploy in the Oracle Portal the file is not upload, because the variable isMultipart is false:
    UPToFile.ProcessAction(...) :
    boolean isMultipart = PortletFileUpload.isMultipartContent(request);
    (Utility method that determines whether the request contains multipart content.)
    view.jsp:
    <FORM ACTION="<portlet:actionURL/>" METHOD="POST" enctype="multipart/form-data" >
    upload file: <INPUT TYPE="file" NAME="file-upload" SIZE="20">
    <INPUT TYPE="SUBMIT" value="upload" >
    </FORM>
    I do not understand because "isMultipart" is "false".
    Tanks.
    EDIT: sorry, now work. :)
    Message was edited by:
    dartan
    null

Maybe you are looking for

  • Garmin, GPS & Googleearth

    Hi! I want to plan and transfer waypoints & tracks from Googleearth to a Garmin GPS without using Windows. First of all, is this possible? Anyone tried this? Second: What do I need for this? What device, what (free) software for converting and transf

  • JavaFX with iPad and other Tablets...

    Hi, can i run JavaFX code on iPad4 and iPhone ?? on other tablets like Nexus - Galaxy ... How can i make programming on iPad -iPhone using Java and JavaFX ?? it seems that no intersection between iPadiPhone and Java ..? Really ?? Many thanks

  • HT4623 why i cannot open my iphone?

    why i cannot open my iphone?

  • USage of URL iView

    Hi All, How can we use the URL iView, in the process of portal branding. Regards Seshu

  • TabNavigator tabs not initializing

    I am using a tabnavigator, but when I use the application, if I access components on tabs that the user has not yet selected, I get errors as if those components were null. If I click on all of the tabs before doing anything, the program works fine.