Commons fileupload to delete a file

Has anyone used the jakarta commons fileupload package to delete a file? Is it possible?
There is a delete() method in the package, but I can't get it to work. Does anyone have any ideas?

Fair comment, point taken. Yes, I realise I can do it straight from a servlet, and yes, there was another thorn that wasn't in the post (it was in a post elsewhere).
The point being that since I use the commons filupload to upload the files to the server in the first place - and give the user the option of creating a set of directories in which to place the file, if I the user then wants to delete the uploaded file the servlet has to have some way of recovering the path and getPath(), getAbsolutePath() etc don't find the right path - they only return a path: /bin/file- that was really the problem.

Similar Messages

  • Servlets , Commons FileUpload , MySQL and large file trouble

    Hey Guys,
    I am trying to upload files from a servlet handled page using jakarta commons file upload library into MySQL. I could not upload a 40M file . I can upload smaller size, 1-5 M , haven't tried 10-20 M sizes. MySQL variable for size is set to 64M.
    any clues would help a lot !
    thanks,
    AZ

    sabre, what about changing the
    max_allowed_packet value?I'm not sure this would help since we don't know what the symptoms of the failure are. I suspect that the OP is first trying to load the whole file into memory before writing any of it to MySQL.
    If you look at the MySQL manual you see
    "Both the client and the server have their own max_allowed_packet variable, so if you want to handle big packets, you must increase this variable both in the client and in the server."
    so just changing the client may not work anyway.

  • Commons-Fileupload question

    Hi,
    I'm trying to use the commons-fileupload-1.1.jar file and I've placed it in my WEB-INF/lib folder. When I try to compile my java though, I get an error that reads: package org.apache.commons.fileupload does not exist. I'm importing like this:
    import org.apache.commons.fileupload.DiskFileUpload;
    I've searched for answers on this already but can't find anything. I don't know if I'm placing it in the wrong folder or what. I'm using Tomcat so I also tried placing the jar file in the common/lib and server/lib folders but neither solved the problem. I've read that I may need to set in my classpath, but I don't know how to do this. Any help is appreciated. Thanks

    I'm trying to use the commons-fileupload-1.1.jar
    ar file and I've placed it in my WEB-INF/lib folder.
    When I try to compile my java though, I get an error
    r that reads: package
    org.apache.commons.fileupload does not exist.
    I'm importing like this:
    import org.apache.commons.fileupload.DiskFileUpload;Placing the jar in the WEB-INF/lib is the correct thing to do. But this would take care of the runtime. For compilation, you HAVE to set the jar to the classpath.
    javac -classpath "%CLASSPATH%;c:\Tomcat\MyApp\WEB-INF\lib\commons-fileupload-1.1.jar" MyClass.javaThis is how your command should look.
    I would rather suggest you to use Ant and create a simple build script to take care of all the compilation and classpath part.

  • HT1923 In trying to delete the Apple file in the Program/Common File I can delete all contents except the Internet Services folder.  Thus preventing me from deleting the Apple FIle.  Error message says I need permission to delete this file.  How do I proc

    Trying to delete the Apple Folder from Program Files/Common Files.  I can delete all the contents except for the Internet Services folder which prevents me from making the deletion.  The error message says "you need permission to delete this file".
    Discovered this problem when trying to upgrade from my 3G iPhone to a new 5S iPhone unsucessfully.

    See note 3 of Troubleshooting issues with iTunes for Windows updates.
    tt2

  • HT1923 When attempting a reinstall of iTunes, I cant delete the file C\Program Files\Common Files\Apple\Internet Services\Shellstream.resources due to same error message as described above for iPod file; however i can't find it anywhere in the Task Manage

    When attempting a reinstall of iTunes, I cant delete the file C\Program Files\Common Files\Apple\Internet Services\Shellstream.resources due to same error message as described above for iPod file; however i can't find it anywhere in the Task Manager

    That one's consistent with disk/file damage. The first thing I'd try with that is running a disk check (chkdsk) over your C drive.
    XP instructions in the following document: How to perform disk error checking in Windows XP
    Vista instructions in the following document: Check your hard disk for errors
    Windows 7 instructions in the following document: How to use CHKDSK (Check Disk)
    Select both Automatically fix file system errors and Scan for and attempt recovery of bad sectors, or use chkdsk /r (depending on which way you decide to go about doing this). You'll almost certainly have to schedule the chkdsk to run on startup. The scan should take quite a while ... if it quits after a few minutes or seconds, something's interfering with the scan.
    Does the chkdsk find/repair any damage? If so, can you get an install to go through properly afterwards?

  • 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());

  • JSP error java.lang.NoClassDefFoundError: org/apache/commons/fileupload/Fil

    I'm rather new to jsp. I'm using myeclipse and I'm deploying my site on tomcat. I've been slowly working away on the errors in my log files. Most of the problems that I've run into have been missing jar files. The log error that I'm stuck on follows:
    10:14:40,359 ERROR [Faces Servlet]:253 - Servlet.service() for servlet Faces Servlet threw exception
    java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileUpload
         at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:115)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at com.wolverinecrane.view.util.SecurityFilter.doFilter(SecurityFilter.java:77)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    In my buildpath I have commons-fileupload-1.0.jar which includes org.apache.commons.fileupload which has the class FileUpload.class in it.
    Any help on what may be going wrong here would be appreciated.
    Dan

    Solved:
    http://javalive.com/modules/newbb/viewtopic.php?topic_id=355&post_id=1013&order=0&viewmode=flat&pid=0&forum=4#forumpost1013

  • File upload using apache Commons FileUpload problem

    Hi All,
    I have used Commons FileUpload for uploading files from windows to unix machine. I'm able to upload files but I have a problem about the contents of file copied in unix. When i upload files few files containing special characters are not copied correctly in unix instead ascii codes are getting copied/written. Seems to be a problem with character encoding.
    For example symbol "�" is not getting copied correctly in unix. So as new line character to. If anyone has faced such issues kindly provide few pointers on this. Appreciate your guidance.
    Thanks,
    -Aj

    Thanks for the reply.
    I'm using the Commons FileUpload class "FileItem" which holds the filestream data and using function
    code snippet of file upload
    ServletFileUpload servletFileUpload = new ServletFileUpload(new DiskFileItemFactory());
    List fileItemsList = servletFileUpload.parseRequest(request);
    Iterator it = fileItemsList.iterator();
    while (it.hasNext())
         FileItem fileItemTemp = (FileItem)it.next();
         File saveToFile = new File("newFile");
          fileItem.write(saveToFile ); // write fileItem data to saveToFile.
    } FileItem object takes care of writing data to disk.No idea,how it does internally.
    Thanks,
    -Aj.

  • Asking for my password when I try and delete a file

    I have a few files that I can't seem to delete without the computer asking for my password. When I try and delete them, it shows this message:
    Authenticate
    Finder requires that you type your password
    Then the window has fields for my name and password. Under the Details arrow it says this:
    Requested right: com.apple.desktopservices
    Application: /System/Library/CoreServices/Finder.app
    I'm not happy with having to provide my password just to delete a file. And not all files produce this result. Why does it do this?
    Cheers,
    Tina

    Select the folder containing the file in the Finder and choose Get Info from the File menu; if the file is on the desktop, click on the desktop so that no icon is selected. Under Ownership & Permissions, change the settings so you have Read & Write access to the folder. This should not be done in system-level folders.
    You will be asked to enter your password when you try to delete the file in the following circumstances:
    1. If the folder you're deleting the file from is set not to allow you write access. This is the most common case.
    2. If the folder containing the file has the Locked checkbox set. This cannot be turned on or off in the Finder in versions of Mac OS X older than 10.4. If this was the case, you would be told that you didn't have permission to delete the file even after entering your password.
    3. If the enclosing folder has the sticky bit set and neither the file nor the enclosing folder are owned by your account. No item in your home folder should have the sticky bit set, but other parts of the hard disk(such as /Users/Shared/ and the hard disk itself) do.
    (11194)

  • Attachements with apache commons fileupload

    I'm using:
    http://commons.apache.org/fileupload/
    to write file on server side (Tomcat running on Windows with XP or 2003).
    I'm sending data to servlet with doPost() as follows:
        protected void doPost(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            PrintWriter out = response.getWriter();
            try {
                DiskFileItemFactory factory = new DiskFileItemFactory();
                factory.setSizeThreshold(4096);
                factory.setRepository(new File("test"));
                ServletFileUpload upload = new ServletFileUpload(factory);
                upload.setSizeMax(1000000);
                List fileItems = upload.parseRequest(request);
                Iterator i = fileItems.iterator();
                String comment = ((FileItem) i.next()).getString();
                FileItem fi = (FileItem) i.next();
                String fileName = fi.getName();
                // db
                fi.write(new File("C:/", fileName));
            } catch (Exception ex) {
                out.print(ex.getMessage());
            out.close();
        }but it's response is:
    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: Servlet execution threw an exception
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    root cause
    java.lang.NoClassDefFoundError: org/apache/commons/io/output/DeferredFileOutputStream
         org.apache.commons.fileupload.disk.DiskFileItemFactory.createItem(DiskFileItemFactory.java:196)
         org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:358)
         org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
         Upload.doPost(Upload.java:69)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    root cause
    java.lang.ClassNotFoundException: org.apache.commons.io.output.DeferredFileOutputStream
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
         java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
         org.apache.commons.fileupload.disk.DiskFileItemFactory.createItem(DiskFileItemFactory.java:196)
         org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:358)
         org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
         Upload.doPost(Upload.java:69)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.16 logs.
    Apache Tomcat/6.0.16don't know why.. any ideas?

    java.lang.ClassNotFoundException: org.apache.commons.io.output.DeferredFileOutputStreamThe mentioned class is missing in the runtime classpath.
    Add it (in this specific case, the JAR file with the mentioned class) to the classpath and the problem will disappear.
    This class is part of Commons IO. Read the dependencies page at FileUpload user guide which JAR's you all need.

  • Can't delete some files due to a persistent lock.

    I've been having problems deleting a few files. I get this error
    oracle.ifs.common.IfsException: IFS-30650: PublicObject has a persistent lock; unable to change
         void oracle.ifs.common.IfsException.<init>(int)
              IfsException.java:341
         void oracle.ifs.common.IfsException.<init>(int, oracle.ifs.common.Traceable)
              IfsException.java:361
         void oracle.ifs.server.S_LockObject.verifyCanDeleteLockedPublicObject(oracle.ifs.server.S_PublicObject)
              S_LockObject.java:709
         java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
              native code
         java.lang.Object oracle.ifs.server.S_LibraryObject.invokePolicyMethod(java.lang.String, java.lang.Object[], java.lang.String[])
              S_LibraryObject.java:2701
         void oracle.ifs.server.S_LockObject.handleLockPolicy(oracle.ifs.server.S_PublicObject, oracle.ifs.server.S_LibraryObjectDefinition, java.lang.String)
              S_LockObject.java:405
         void oracle.ifs.server.S_PublicObject.extendedPreFree(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition)
              S_PublicObject.java:1818
         void oracle.ifs.server.S_Document.extendedPreFree(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition)
              S_Document.java:377
         void oracle.ifs.server.S_LibraryObject.preFree(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition)
              S_LibraryObject.java:1655
         void oracle.ifs.server.S_LibraryObject.free(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition)
              S_LibraryObject.java:2328
         void oracle.ifs.server.S_LibrarySession.DMFree(java.lang.Long, java.lang.Long, oracle.ifs.server.S_LibraryObjectDefinition)
              S_LibrarySession.java:9283
         void oracle.ifs.beans.LibrarySession.DMFree(java.lang.Long, java.lang.Long, oracle.ifs.server.S_LibraryObjectDefinition)
              LibrarySession.java:9222
         void oracle.ifs.beans.LibraryObject.free(oracle.ifs.beans.LibraryObjectDefinition)
              LibraryObject.java:1132
         void oracle.ifs.beans.LibraryObject.free()
              LibraryObject.java:1108
         void Tester.Tester.unLockFiles(java.lang.String)
              Tester.java:149
         void Tester.Tester.main(java.lang.String[])
              Tester.java:81
    This error even happens when I log in as system which has system admin priveleges. I can't figure out how to release the lock on these files that have it. I don't even know how this lock was created.
    I also tried to loop through all of the files with this lock and change the files to unlocked, but that produced a stack trace as well.
    Shouldn't system admin be able to delete any file?
    Thanks for the help.

    Tried that as well initially. When I log in as system, set as administration mode, I tried setting the objects to unlock using this code.
    LibrarySession session = [My Get Session Code];
    session.setAdministrationMode(true);
    IfsFileSystem fso = new IfsFileSystem(session);
    Folder folder = (Folder)fso.findPublicObjectByPath([Path to folder which contains the locked files]);
    PublicObject[] pos = folder.getItems();
    for (int index = 0; index < pos.length; index++) {
    pos[index].getLockObject().setLockState(LockObject.LOCKSTATE_UNLOCK);
    I get this exception when I run that code
    oracle.ifs.common.IfsException: IFS-30020: Attribute is not updateable (LOCKSTATE)
    This is kinda frustrating. Luckily this is in development right now but I don't want something like this happening in production, and if it did, it'd be nice to be able to fix it.
    Thanks again for your help.

  • Commons-fileupload

    I have a strange situation where the components on a form are dynamically built and the form is submitted to an action method "create" on a Controller class. Basically the form looks like this:
    HtmlPanelGrid
    (ROW 1)
    --HtmlOutputText
    --HtmlPanelGrid
    ----HtmlSelectOneRadio
    ----HtmlInputFileUpload
    (ROW 2)
    --HtmlOutputText
    --HtmlPanelGrid
    ----HtmlSelectOneRadio
    ----HtmlInputText
    Once form is submitted from the "create" method on the Controller class I can lookup the values of the HtmlInputText by doing:
      String txtBoxValue = request.getParameter(htmlInputText.getId());  However, I cannot figure out how to access the file that was submitted (the HtmlInputFileUpload). I tried using commons-fileupload as below:
    public InputStream getFileFromRequest(String fieldName, HttpServletRequest request)
         FileItemFactory factory = new DiskFileItemFactory();
         ServletFileUpload upload = new ServletFileUpload(factory);
         InputStream uploadedStream = null;
         List items;
         try
              // Parse the request
              items = upload.parseRequest(request);
              System.out.println("items.size() "+items.size());
         catch(FileUploadException fue)
              System.out.println("Exception trying to parse request for FileItems");
              System.out.println(fue);
              throw new RuntimeException(fue);
         //walk through items in the form
         ....but the items.size() is always zero. I am thinking JSF is intercepting this form before I pass it to the "parse" method and somehow this makes the form un-parsable" for commons-fileupload. If this is true...how can I get the file that was submitted before JSF messes with it...or better yet, how can I get the file that was submitted directly from JSF?

    If I can't figure this one out soon...I will be forced to switch to scriptlets. Just to recap
    Basically I have all these input type="file" form elements on a page that are created dynamically through a backing bean when a page loads. I can't create <t:inputFileUpload> tags and map each of them to a bean since they are dynamically created. So...I have tried to use commons-fileupload in the action method of my controller class (where the page submits) but it looks like by the time the action method is reached the MyfacesExtensionsFilter is messing up the request (because the commons-fileupload can't find any form elements when it parses the request).
    Does anyone else have any suggestions or know how to get the file that was submitted from JSF? I know it has access to it because if I try and upload a file too large it throws an error message (see previous post for error message).
    Jim

  • Can't delete song files

    Running iTunes 9.1 on Windows XP Home Edition 2002, SP3. Almost every time I go to delete a song, it no longer gives me the option to delete the file so I'm not clearing any space on my drive. It does this less often for apps, but still does it. Is there an option I turned off by accident? Is this just a bug? Thanks for the help.

    I had the same problem. I found many duplicates on my pc after moving files to an external hard drive. Some duplicates existed before this move but I did not worry about them. So, after a while my children were running out of space on their ipods so I used the "Show Duplicates" feature and deleted "the .....ing duplicates". Now my children tell me a great deal of their purchased music is missing and they are very annoyed. I told them that I thought Apple/iTunes spoke English and that Duplicate means just that, A Duplicate. This is extremely annoying. It seems like such a common sense fubar thing which is contrary to the awesome quality of the itunes/ipod in general. How do I get the songs we already *payed for* back on our computer? Or, are we screwed and in a spot where we must repurchase this music? Honestly, this is something I expect from microsoft, not Apple.

  • Org/apache/commons/fileupload/FileUploadException

    hia all,
    i am trying to save an image using <html:file> tag in jsp pages
    usig struts
    Before doing any save action,i am getting this error
    any one know
    thanx
    8:41:52,714 ERROR [Engine] StandardWrapperValve[FrontController]: Servlet.service() for servlet FrontController threw exception
    java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileUploadException
         at java.lang.Class.getDeclaredConstructors0(Native Method)
         at java.lang.Class.privateGetDeclaredConstructors(Class.java:1590)
         at java.lang.Class.getConstructor0(Class.java:1762)
         at java.lang.Class.newInstance0(Class.java:276)
         at java.lang.Class.newInstance(Class.java:259)
         at org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:145)
         at org.apache.struts.util.RequestUtils.getMultipartHandler(RequestUtils.java:564)
         at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:430)
         at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:205)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
         at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
         at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:150)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:54)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:536)

    Commons-fileupload.jar is already in the web-inf/lib.
    Is there another solution?Add the jar to the server's shared/lib or common/lib. Did you really need to ask this on an old thread?

  • Apache commons fileUpload parseRequest finds no form fields-portalComponent

    Hello All,
    What am I trying?
    Developing a portal component (no JSP, no HTMLB).
    Have used Apache commons fileUpload libraries.
    What is the problem?
    parseRequest method works fine when I right click and preview from PCD.
    parseRequest method returns 0 html form elements when the portal component is tested under the TLN (via role -> workset -> iview)
    What else did I try?
    1.
    I looked in to Apache documentation - there are two different APIs for two different scenarios, Servlets and Portlets.
    My understanding is that I can not use portlets scenario in SAP Portal.
    Servlets scenario was what worked while doing a preview from PCD.
    2. I have looked into other solutions like using web dynpro and HTMLB to do file upload - not really a fan of either for various reasons.
    Can any one help?
    I am trying to understand why the HTTPServletRequest when parsed returns 0 form elements in the SAP Portal scenario.
    Thanks!

    Hello Ankur,
    You said:
    The reason for this is, unlike the request parameters, the multipart formdata is 'read-once-only' (because once
    the data is read off the ServletInputStream, it is gone! It cannot be read again). When you call a full portal request it goes through lot of gets before reaching your component.
    The above concept is not fully clear to me. I got a hint to something like this happening from this link that explains the need for portlets API scenario compared to a servlets scenario - Link: http://commons.apache.org/fileupload/using.html
    (Search for Servlets and Portlets within that link)
    I initially thought something like what you had replied would have happened. However, when I do a getContentLength on HTTPServletRequest in the SAP Portal mode (role -> workset -> iview), the size still includes that of the uploaded document. So like you said "it is gone! It cannot be read again" may not be accurate.
    My question still remains open.
    Edited by: Mohammed on Aug 24, 2009 6:29 PM

Maybe you are looking for

  • Change the characterstyle in all textframes

    Hello all, i have a problem in my javascript script. I want a script that check all textframes in the document and it have to check the characterstyle from each char. If there is a "-" in the text, the characterstyle will switch to normal. The proble

  • Do you want turn off cellular data?

    Unfourtuanatelly Apple doesn't offer us this option, but I figure out a way to do it, even in mobile phones that does not have the option to edit the APN. In my case, the option to edit the APN was acidentally turned off by me, when I typed "disabled

  • Silly question on proper use of SCI link.

    I have inherited a cluster setup of two 4500s and another cluster of 6500s. Though there are two SCI interfaces connecting each pair, all of the software is configured to communicate over a 100bt ethernet link. My first instinct is to assume a better

  • IDOCs - IDOC type ORDERS05 with message type MSGCHG

    Hi, I'm in my first IDOC project and I'm facing a problem. I need to change sales orders with EDI messages, so I've decided to use message type ORDCHG and IDOC type ORDERS05. I'm filling segments E1EDK01, E1EDP01 and E1EDP19. In header the action is

  • Additonal VGA monitor showing in Display properties.

    I have a problem, I am currently running Window 7 Pro 64 and when i restarted my laptop it now has an additional monitor showing in the display properties.  I do not have an external VGA monitor connected to it, and I have tried to remove the display