File uploads using servlets to oracle8i database

Hi,
Help please, How I can a File Upload using BLOB's into the oracle database, any sugestions...
Thanks
Moacyr
[email protected]

Try the jason hunter book Java Servlet Programming for a very good description or the web site hosted by o'reilly
www.servlets.com
Has a very neat java class for decoding multipart mime encoded files (the upload stream from the browser). Seems to accomodate most of the differing browsers intretation of the standard.
Note to Oracle: This should really be handled by the servlet engine as an Oracle extension. Where the servlet engine strips the mime encoding out before the servlet is called placing the decoded file in an associated extension call. ie: cast the request to an Oracle request object which has file uploaded method.

Similar Messages

  • URGENT.........File Upload using Servlets and jsp

    I am a new servlet programmer.......
    iam using tomcat server......
    can any one pls help in writing code for file upload using servlets and jsp without using multipart class or any other class like that....
    Please URGENT..

    Slow down! "Urgent" is from your perspective alone. I, myself, am not troubled or worried in the least.
    hi ugniss
    thanks for ur reply....sorry i was not
    y i was not asked not to use multipart class or any
    other class like that...is there any other
    possibility to do file uploading from jsp to
    servlet...
    Just as an aside, a JSP is a Servlet. But even if I move beyond that, the question does not make sense. If you want a "JSP to upload to a Servlet", then simply do so in memory. You are still (likely) within the same scope of a given request. However, if instead you are referring to a JSP that is displayed on a browser, then really you are talking about HTML, which is what the browser will receive. And since you are now talking about a browser, your only real, viable option is a multi-part file upload. So, it is either server or it is browser. And either way, the question leads to very established options, as outlined above.
    the main concept is.. in the browser the user selects
    a particular file and clicks the button upload..after
    clicking upload the jsp should sent the file to the
    servlet in streams...there the servlet gets in and
    saves in a server location........this is wat i hav
    to do...
    Okay. So, after reading my previous (redundant) paragraph, we have arrived at the crux of the issue. You have a JSP that will be output as HTML to a client (browser) which you want to upload content to your server (handled by a Servlet). So, you are now stuck again with multi-part. The requirement to not use multi-part is non-sensical. You can overcome it, say, if you write your own applet or standalone Swing client. However, if your users are invoking this functionality from a browser, you are limited by the options that W3C has provided you. Use multi-part.
    is there aby possibilty to do this.....can any one
    pls help....Take the advice to download and review Jakarta Commons FileUpload. Inform your management that their requirement makes no technical sense. Research on your own. There are dozens of examples (and tutorials) on file upload using multi-part. Embrace it. Live it. Love it.
    - Saish

  • File upload using Servlets and Weblogic

    Hi,
    I need to write a servlet that can upload a .doc file to a folder on the server. Can someone please let me know abot the code i need to write, as i am a novice in servlets.
    Thanks in advance
    buddy0303

    Another, simpler (we think), such package is Jenkov HTTP Multipart File Upload. It's a servlet filter which can work in front of both servlets and JSP's. The servlet filter parses the uploaded file and stores it temporarily on the servers disk. When the servlet or JSP executes afterwards, it can obtain all the information about the file, from the request attributes. There is a decent manual for HTTP Multipart File Upload on the website.
    Just search for "Jenkov HTTP Multipart" on Google and you'll find it. HTTP Multipart is free, open source, Apache Licsense.

  • File uploads using jQuery with jquery.fileupload.js fails in Firefox over SSL

    Please see the link below where I originally posted the question.
    http://stackoverflow.com/questions/27792614/file-uploads-using-jquery-with-jquery-fileupload-js-fails-in-firefox-over-ssl

    Thanks. In my estimation that is exactly the issue. But that doesn't help with a resolution.
    The actual file size: 945,991 bytes
    If Firefox is miscalculating the length (in Safari/Chrome 945991 and 946241 in Firefox), then Firefox is reporting erroneously and should be raised as a bug in Firefox, would you agree?

  • File Upload using Flex/ColdFusion.  2044 error

    I am looking for a little more clarity around the file upload using Flex and Cold Fusion.  When I run this using my server I get Error #2044: Unhandled IOErrorEvent:. text=Error #2038: File I/O Error.
    I did create a regular cfform and had it use my ColdFusion upload form and that worked fine, so I feel good about the upload form. I am starting to think there is a permission error with the Flash Player writing to the folder.  When this is ran, it will show the file being 100% loaded but the complete event is never triggered.  I put alerts to see where it hits and 100 does show at the same time as my error message.  The complete alert never shows.  I also put an alert in my cfm page and it never reaches that page to hit it.  Whether I use an absolute URL or relative path. I have also tried the urlrequestmethod.post and nothing changed.  Thanks in advance.  BTW.  I am using Flex 3.
    This is my mxml file
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:example="com.example.*" horizontalAlign="center" viewSourceURL="srcview/index.html">
    <mx:Script>
    <![CDATA[
    import com.example.FileDownload 
    import mx.controls.Label 
    import com.example.FileUpload]]>
    </mx:Script>
    <mx:Label id="title" text="File I/O Example" fontSize="24" fontStyle="bold" />
    <mx:Text id="subtitle" text="From Programming ActionScript 3.0, Chapter 22: Networking and communication" width="100%" textAlign="center" fontSize="12" /><example:FileDownload 
    id="fileDownload" creationComplete="fileDownload.init(downloadProgress, cancelDownload);" />
    <example:FileUpload id="fileUpload" creationComplete="fileUpload.init(uploadProgress, cancelUpload);" />
    <mx:HBox>
    <mx:Panel title="Upload File" paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">
    <mx:ProgressBar id="uploadProgress" label="" mode="manual" />
    <mx:ControlBar horizontalAlign="right">
    <mx:Button id="startUpload" label="Upload..." click="fileUpload.startUpload();" />
    <mx:Button id="cancelUpload" label="Cancel" click="fileUpload.cancelUpload();" enabled="false" />
    </mx:ControlBar>
    </mx:Panel>
    <mx:Panel title="Download File" paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">
    <mx:ProgressBar id="downloadProgress" label="" mode="manual" />
    <mx:ControlBar horizontalAlign="right">
    <mx:Button id="startDownload" label="Download..." click="fileDownload.startDownload();" />
    <mx:Button id="cancelDownload" label="Cancel" click="fileDownload.cancelDownload();" enabled="false" />
    </mx:ControlBar>
    </mx:Panel>
    </mx:HBox></mx:Application>
    here is my coldfusion upload script
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <script>alert('hello')</script>
    <cfset currentPath = getCurrentTemplatePath()>
    <cfset currentDirectory = getDirectoryFromPath(currentPath)>
    <cfoutput>This directory is #currentDirectory#</cfoutput>
    <cffile action="UPLOAD" filefield="Filefield" destination="#currentDirectory#" nameconflict="OVERWRITE"/>
    </body>
    </html>
    here is the package
    package  
    com.example { import flash.events.*; 
    import flash.net.FileReference; 
    import flash.net.URLRequest; 
    import flash.net.URLRequestMethod; 
    import mx.controls.Button; 
    import mx.controls.ProgressBar; 
    import mx.core.UIComponent; 
    import mx.controls.Alert; 
    public class FileUpload extends UIComponent { 
    // Hard-code the URL of the remote upload script. 
    private const UPLOAD_URL:String = "upload_script.cfm"; 
    private var fr:FileReference; 
    // Define reference to the upload ProgressBar component. 
    private var pb:ProgressBar; 
    // Define reference to the "Cancel" button which will immediately stop the upload in progress. 
    private var btn:Button; 
    public function FileUpload() {}
    /*** Set references to the components, and add listeners for the SELECT,
    * OPEN, PROGRESS, and COMPLETE events.
     public function init(pb:ProgressBar, btn:Button):void { 
    // Set up the references to the progress bar and cancel button, which are passed from the calling script. 
    this.pb = pb; 
    this.btn = btn; 
    fr =
    new FileReference();fr.addEventListener(Event.SELECT, selectHandler);
    fr.addEventListener(Event.OPEN, openHandler);
    fr.addEventListener(ProgressEvent.PROGRESS, progressHandler);
    // fr.addEventListener(Event.COMPLETE, completeHandler); 
    /*** Immediately cancel the upload in progress and disable the cancel button.
     public function cancelUpload():void {fr.cancel();
    pb.label =
    "UPLOAD CANCELLED";btn.enabled =
    false;}
    /*** Launch the browse dialog box which allows the user to select a file to upload to the server.
     public function startUpload():void {fr.browse();
    /*** Begin uploading the file specified in the UPLOAD_URL constant.
     private function selectHandler(event:Event):void { 
    var request:URLRequest = new URLRequest(UPLOAD_URL); 
    /* request.url = UPLOAD_URL*/request.method = URLRequestMethod.POST;
     try  
    {fr.upload(request);
    }catch (error:Error){
    trace  
    ("error uploading")}
     /*** When the OPEN event has dispatched, change the progress bar's label
    * and enable the "Cancel" button, which allows the user to abort the
    * upload operation.
     private function openHandler(event:Event):void {pb.label =
    "UPLOADING";btn.enabled =
    true;}
    /*** While the file is uploading, update the progress bar's status and label.
     private function progressHandler(event:ProgressEvent):void {pb.label =
    "UPLOADING %3%%";pb.setProgress(event.bytesLoaded, event.bytesTotal);
    if(event.bytesLoaded==event.bytesTotal){ 
    trace(Event.COMPLETE)Alert.show(
    "100")}
    /*** Once the upload has completed, change the progress bar's label and
    * disable the "Cancel" button since the upload is already completed.
     private function completeHandler(event:Event):void {Alert.show(
    "in function")pb.label =
    "UPLOADING COMPLETE";pb.setProgress(0, 100);
    btn.enabled =
    false;}

    Presumably you need to add a result handler to your request.

  • Error in File uploading using jsp

    I am tring to upload files to a mysql database using jsp.I have used BLOB type to store files.Iam using the JDBC driver mysql-connector-java-2.0-14-bin to connect the database with the jsp API.My problem is when i try to transfer a file of size which is less than the possible capacity through blob ,which is 1048576 bytes ( for example when a file of size 916KB is attempted to transfer) the following error is being generated.
    java.lang.IllegalArgumentException: Packet is larger than max_allowed_packet from server configuration of 1048576 bytes
         at com.mysql.jdbc.Buffer.ensureCapacity(Unknown Source)
         at com.mysql.jdbc.Buffer.writeBytesNoNull(Unknown Source)
         at com.mysql.jdbc.PreparedStatement.executeUpdate(Unknown Source)
         at com.mysql.jdbc.PreparedStatement.executeUpdate(Unknown Source)
         at org.apache.jsp.file3$jsp._jspService(file3$jsp.java:110)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:484)
    java.lang.IllegalArgumentException: Packet is larger than max_allowed_packet from server configuration of 1048576 bytes
         at com.mysql.jdbc.Buffer.ensureCapacity(Unknown Source)
         at com.mysql.jdbc.Buffer.writeBytesNoNull(Unknown Source)
         at com.mysql.jdbc.PreparedStatement.executeUpdate(Unknown Source)
         at com.mysql.jdbc.PreparedStatement.executeUpdate(Unknown Source)
         at org.apache.jsp.file3$jsp._jspService(file3$jsp.java:110)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:484)
    My uploading code in jsp is as follows.
         <% try{
              Class.forName("org.gjt.mm.mysql.Driver").newInstance();
              Connection dbCon = DriverManager.getConnection("jdbc:mysql:///uoc");
              out.println("Connection done !");
              Statement stmt = dbCon.createStatement();
              out.println("Statement Created !");
    ResultSet rs = stmt.executeQuery("SELECT * FROM blob_test)
    stmt.close();
    dbCon.close();
    out.println("<br><br> <b>Data Successfully selected !<b>");
    } //try
    catch(SQLException e){
         out.println(" <br> ");
         out.println("Sorry ! problem in selecting a data "+e.toString());
         out.println(" <br> ");
                   e.printStackTrace();
    %>
    Please help .I thank You in advance for any help .

    Have you tried increasing the BLOB field greater than 1048576 or using a smaller file of say 1 or 2k as a test? There is no guarantee that the database will store the file with exactly the same size as the file on the filesystem, so the file might be more than 916k in the database.
    Using BLOBs is a great way to destroy the performance of your database by the way :)

  • Reliable file upload using JDev, AS and other

    Hello,
    I'm not sure this is the right place to post this message, sorry if I was wrong to put it here.
    The question is our company is developing software, for active data exchange with other systems. We decided to exchange in xml format, by means of both web services and web interface (so that exchange could happen both automatically and on user request). We use JDev to develop, Oracle AS to deploy application. Systems we exchange can use various platforms, in fact, it doesn't matter what exactly they use. The question is we need a reliable way to exchange large (sometimes small, but can be 1Gb or, for example, 10Gb) files, maybe with appropriate security, so that it could continue if something happens with network connection.
    One simple decision is to have a web service that accepts, for example, 100K at a time, and another service continuously calls it until file is transfered. So it can check response code. But are there better decisions? I think, there are libraries or smth like this?
    Thanks in advance, believe, it's a right place to get help.
    Valeriy

    Another, simpler (we think), such package is Jenkov HTTP Multipart File Upload. It's a servlet filter which can work in front of both servlets and JSP's. The servlet filter parses the uploaded file and stores it temporarily on the servers disk. When the servlet or JSP executes afterwards, it can obtain all the information about the file, from the request attributes. There is a decent manual for HTTP Multipart File Upload on the website.
    Just search for "Jenkov HTTP Multipart" on Google and you'll find it. HTTP Multipart is free, open source, Apache Licsense.

  • File Upload using Tomcat 5.x Apache 2.x

    Hi,
    Once I updated my tomcat 5.x to apache 2.x and ran my upload jsp code using java api i wrote to upload file to server, all pictures or videos received seems distorted.. At first i thought of bit shift or something but when i upload a textfile all look right.. Anyone know what the heck is going on before i disect my code.
    thanks
    henry

    make sure your modjk logs don't have any errors.
    Here's a peice out of my httpd.conf
    #ADDed Oct 15,2003, seemed to remove modjk error
    AddType multipart/form-data .gif .png  .jpg .peg .jpeg .jpeI used to get strange modjk logged errors.
    Also did you compile jk2 from source???
    com.oreilly.servlet --- cos
    http://www.servlets.com/cos/index.html
    http://www.servlets.com/cos/cos-05Nov2002.zip
    But if my bit shift is correct wouldn't my regular textfile upload be distored?From what I remember, the problem is something to do with logical AND or OR, with the bits. Apache receives it fine, passess it through jk, and and either the most sig or least gets lost. Image data is critical as every bit counts, text file, you may not notice it(white space), or every nTH file upload might fail.
    here are the version numbers of software I use, and have compiled all from source.
    apache-httpd-2.0.47
    tomcat-4.1.27
    jk2-connectors-2.0.2

  • File Upload Using WebDynpro

    Hi All,
    I want to upload single or multiple CSV files using a user interface written in WebDynpros. The files will then be parsed and converted to XML.
    I did something similar with jsps earlier but am not sure how to go about it with WebDynpros.
    If anyone has already done something similar then please share your views.
    Thanks in advance.
    Noaman

    Hi,
    check this link
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/web dynpro sample applications and tutorials.htm#ui
    File Upload/Download 23/30
    Tutorials will help you.
    Regards,
    RK

  • File Upload using PRC API's

    Guys,
    I am trying to upload a new document using PRC API's. Below is required code snippet that i am using.
    IRemoteDocument remoteDoc = documentManager.createRemoteDocument(folderID,dataSourceID,document.getPath()); remoteDoc.setOverrideName(document.getName()); remoteDoc.setOverrideDescription(document.getDescription()); remoteDoc.setType("http://www.plumtree.com/dtm/mime", document.getFileType());int docID = -1;docID = remoteDoc.save();
    dataSourceID - ID of my file upload datasource , document - is my java object which has all the document related properties such as , name , description , MIME type of document etc..Below is different document path's(scenarios) that I have triedc:\work\sample.txt\\servername\work\sample.txthttp:\\appserver:7001\appName\uploadfiles\sample.txt
    When I execute this code from my application i get a below error.
    com.plumtree.remote.prc.PortalException: null; nested exception is: java.rmi.RemoteException: Error in function PTDataSource.ImportDocument(vDocumentLocationBagAsXML == '<?xml version="1.0" encoding="ucs-2"?><PTBAG V="1.1" xml:space="preserve"><I N="PTC_DTM_SECT">1001</I><S N="PTC_DOC_ID">application/msword</S><S N="PTC_UNIQUE">\\PHUSEH-L33664.NA.novartis.net\work\sample.doc</S></PTBAG>', lDocumentTypeID == 100, pCard == com.plumtree.server.impl.directory.PTCard@c27b6f, bSummarize == false, pProvider == null): Error in function PTDataSource.ImportDocument (vDocumentLocationBagAsXML == <?xml version="1.0" encoding="ucs-2"?><PTBAG V="1.1" xml:space="preserve"><S N="PTC_DOC_ID">application/msword</S><I N="PTC_DTM_SECT">1001</I><S N="PTC_UNIQUE">\\PHUSEH-L33664.NA.novartis.net\work\sample.doc</S></PTBAG>, lDocumentTypeID == 100, pCard == com.plumtree.server.impl.directory.PTCard@c27b6f, bSummarize == false, pProvider == null): SOAP fault: faultcode='soapenv:Server.userException' faultstring='java.lang.NullPointerException' at com.plumtree.remote.prc.DocumentWrapper.save()
    Below is my environment.Plumtree is running on Weblogic 8.1 (Solaris OS) , ptupload webservice is running on weblogic8.1 solaris,My upload document portlet is running on weblogic 8.1 (Windows OS)
    If anyone has any working sample code please send it to my ID [email protected] or else please upload it here.Thank You ,
    Dan.

    make sure your modjk logs don't have any errors.
    Here's a peice out of my httpd.conf
    #ADDed Oct 15,2003, seemed to remove modjk error
    AddType multipart/form-data .gif .png  .jpg .peg .jpeg .jpeI used to get strange modjk logged errors.
    Also did you compile jk2 from source???
    com.oreilly.servlet --- cos
    http://www.servlets.com/cos/index.html
    http://www.servlets.com/cos/cos-05Nov2002.zip
    But if my bit shift is correct wouldn't my regular textfile upload be distored?From what I remember, the problem is something to do with logical AND or OR, with the bits. Apache receives it fine, passess it through jk, and and either the most sig or least gets lost. Image data is critical as every bit counts, text file, you may not notice it(white space), or every nTH file upload might fail.
    here are the version numbers of software I use, and have compiled all from source.
    apache-httpd-2.0.47
    tomcat-4.1.27
    jk2-connectors-2.0.2

  • Error in image file upload using dreamweaver

    Greeting to you all!
    Please I need you PRO help. My case seem similar to some of the ones I have seen but my code is completely different.
    I wrote this code below using PHP in Dreamweaver and its used to upload images to MySQl database. Now when I upload about 6 images, it shows File Uploaded Successfully. But if I try to upload any thing below 6 images, it will refuse to upload and will echo Upload Failed.
    <?php
    if(isset($_POST['submit']))
              $projid=$_POST['projid'];
              $projname=$_POST['projname'];
              $name=basename($_FILES['file_upload']['name']);
              $t_name=$_FILES['file_upload']['tmp_name'];
              $dir='upload';
              if(move_uploaded_file($t_name,$dir."/".$name))
              $nameone=basename($_FILES['file_uploadone']['name']);
              $t_name=$_FILES['file_uploadone']['tmp_name'];
              $dir='upload1';
              if(move_uploaded_file($t_name,$dir."/".$name))
              $nametwo=basename($_FILES['file_uploadtwo']['name']);
              $t_name=$_FILES['file_uploadtwo']['tmp_name'];
              $dir='upload2';
              if(move_uploaded_file($t_name,$dir."/".$name))
              $namethree=basename($_FILES['file_uploadthree']['name']);
              $t_name=$_FILES['file_uploadthree']['tmp_name'];
              $dir='upload3';
              if(move_uploaded_file($t_name,$dir."/".$name))
              $namefour=basename($_FILES['file_uploadfour']['name']);
              $t_name=$_FILES['file_uploadfour']['tmp_name'];
              $dir='upload4';
              if(move_uploaded_file($t_name,$dir."/".$name))
              $namefive=basename($_FILES['file_uploadfive']['name']);
              $t_name=$_FILES['file_uploadfive']['tmp_name'];
              $dir='upload5';
              if(move_uploaded_file($t_name,$dir."/".$name))
                        mysql_select_db ($database_ProjMonEva,$ProjMonEva);
                        $qur="insert into tbl_images (imageid, projid, projname, name, path, nameone, pathone, nametwo, pathtwo, namethree, paththree, namefour, pathfour, namefive, pathfive) values ('','$projid','$projname','$name','upload/$name','$nameone','upload/$nameone','$nametwo', 'upload/$nametwo','$namethree','upload/$namethree','$namefour','upload/$namefour','$namefi ve','upload/$namefive')";
                        $res=mysql_query($qur,$ProjMonEva);
                        echo 'File uploaded successful';
              else
                        echo 'upload failed!';
    ?>
    I see the problem to come from the echo but I am stock and dont know how to correct it. Can any one please help me.
    Thank you in advance Mike

    Hi Bregent,
    I have been able to resolve the issue. I modified the code this way: This I believe will help those having the same issues.
    These is how I was able to achieve it.
    1. I divided the code into two parts called addnew.php and addnewproject.php.
    The addnewproject.php as seen below will call the addnew.php when the submit button on addnewproject.php is clicked
    <form action="addnew.php" method="POST" id="Add New Project" enctype="multipart/form-data">
          <div align="center">
            <table width="600" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td id="formcells4"><strong id="subheaders">Core Details</strong></td>
                <td></td>
              </tr>
              <tr>
                <td id="dates">*Code (Eg. 2104/12/AB23):<br />
                  <label for="projcode"></label>
                  <span id="sprytextfield1">
                  <input type="text" name="projcode" id="projcode2" />
                <span class="textfieldRequiredMsg">A value is required.</span></span><br /></td>
                <td></td>
              </tr>
              <tr>
                <td colspan="2" id="dates">Project Name:
                  <label for="projname3"></label>
                  <span id="sprytextfield2">
                  <input type="text" name="projname" id="projname3" />
                  <span class="textfieldRequiredMsg">A value is required.</span></span></td>
              </tr>
              <tr>
                <td colspan="2" id="dates">Project Description:<span id="description"><br />
                  <label for="projdesc"></label>
                  <span id="txt_projdesc">
                    <textarea name="projdesc" id="projdesc" cols="70" rows="8"></textarea>
                    <span class="textareaRequiredMsg">A value is required.</span></span></span></td>
              </tr>
              <tr>
                <td id="formcells"><p id="dates">*Date Entered: <em>YYYY/MM/DD</em><span id="year">
                  <label for="projappdate"><br />
                  </label>
                  <span id="txt_dateproapp">
                    <input type="text" name="projappdate" id="projappdate" />
                    <span class="textfieldRequiredMsg">A value is required.</span></span></span></p></td>
                <td id="formcells"><p id="dates">*Project LGA:<span id="txt_projlga">
                  <label for="projlga"><br />
                  </label>
                  <span id="txt_lga">
                    <select name="projlga" id="projlga">
                      <option value="1">.... Select from list ....</option>
                      <?php
    do { 
    ?>
                      <option value="<?php echo $row_rsLGA['lga']?>"><?php echo $row_rsLGA['lga']?></option>
                      <?php
    } while ($row_rsLGA = mysql_fetch_assoc($rsLGA));
      $rows = mysql_num_rows($rsLGA);
      if($rows > 0) {
          mysql_data_seek($rsLGA, 0);
                $row_rsLGA = mysql_fetch_assoc($rsLGA);
    ?>
                    </select>
                <span class="selectRequiredMsg">Please select an item.</span></span></span></p></td>
              </tr>
              <tr>
                <td id="formcells6"><p id="dates">*Project Community:<span id="txt_ojcommunity">
                  <label for="projcommunity"><br />
                  </label>
                  <select name="projcommunity" id="projcommunity">
                    <option value="1">.... Select from list ....</option>
                    <?php
    do { 
    ?>
                    <option value="<?php echo $row_rsCommunity['community']?>"><?php echo $row_rsCommunity['community']?></option>
                    <?php
    } while ($row_rsCommunity = mysql_fetch_assoc($rsCommunity));
      $rows = mysql_num_rows($rsCommunity);
      if($rows > 0) {
          mysql_data_seek($rsCommunity, 0);
                $row_rsCommunity = mysql_fetch_assoc($rsCommunity);
    ?>
                  </select>
                </span></p></td>
                <td id="formcells6"><p id="dates">*Project State:<span id="txt_projstate"><br />
                  <select name="projstate" id="projstate">
                    <option value="1">.... Select from list ....</option>
                    <?php
    do { 
    ?>
                    <option value="<?php echo $row_rsState['state']?>"><?php echo $row_rsState['state']?></option>
                    <?php
    } while ($row_rsState = mysql_fetch_assoc($rsState));
      $rows = mysql_num_rows($rsState);
      if($rows > 0) {
          mysql_data_seek($rsState, 0);
                $row_rsState = mysql_fetch_assoc($rsState);
    ?>
                  </select>
                </span></p></td>
              </tr>
              <tr>
                <td height="63" id="formcells8"><p id="dates">Project Cost:<span id="txt_projcost"><br />
                  <label for="projcost"></label>
                  <span id="txt_projectcost">
                    <input name="projcost" type="text" id="projcost" />
                    <span class="textfieldRequiredMsg">A value is required.</span></span></span></p></td>
                <td id="formcells"><p id="dates">*Project Type:<span id="txt_projtype"><br />
                  <label for="projtype"></label>
                  <select name="projtype" id="projtype">
                    <option value="1">.... Select from list ....</option>
                    <?php
    do { 
    ?>
                    <option value="<?php echo $row_rsType['projtypelist']?>"><?php echo $row_rsType['projtypelist']?></option>
                    <?php
    } while ($row_rsType = mysql_fetch_assoc($rsType));
      $rows = mysql_num_rows($rsType);
      if($rows > 0) {
          mysql_data_seek($rsType, 0);
                $row_rsType = mysql_fetch_assoc($rsType);
    ?>
                  </select>
                </span></p></td>
              </tr>
              <tr>
                <td colspan="2" id="formcells2"><p id="dates">Project Baseline Data:<span id="sprytextarea2"><br />
                  <label for="projbaselinedata"></label>
                  <textarea name="projbaselinedata" id="projbaselinedata" cols="70" rows="8"></textarea>
                </span></p></td>
              </tr>
              <tr>
                <td colspan="2" id="formcells3"><p id="dates">Expected Outcome Of Project:<span id="sprytextarea3"><br />
                  <label for="Projexpoutcome"></label>
                  <textarea name="Projexpoutcome" id="Projexpoutcome" cols="70" rows="8"></textarea>
                </span></p></td>
              </tr>
            </table>
            <table width="600" border="0" cellpadding="0" cellspacing="0" id="teamtable">
              <tr>
                <td colspan="2"><strong id="subheaders">Beneficiaries</strong></td>
              </tr>
              <tr>
                <td width="241"><p>Adult Men Beneficiaries: <span id="txt_adultmen">
                  <label for="adultmen"><br />
                  </label>
                  <input name="adultmen" type="text" id="adultmen" />
                </span></p></td>
                <td width="259"><p>Adult Female Beneficiaries:<span id="txt_adultfem"><br />
                  <label for="adultfem"></label>
                  <input name="adultfem" type="text" id="adultfem" />
                </span></p></td>
              </tr>
              <tr>
                <td><p>Adult Children Beneficiaries:<span id="txt_totalchildren"><br />
                  <label for="children"></label>
                  <input name="totalchildren" type="text" id="totalchildren" />
                </span></p></td>
                <td><p>Total Beneficiaries:<span id="sprytextfield4"><br />
                  <label for="totalben"></label>
                  <input name="totalben" type="text" id="totalben" readonly="readonly" />
                </span></p></td>
              </tr>
              <tr>
                <td><p> </p></td>
                <td><p> </p></td>
              </tr>
              <tr>
                <td><strong id="subheaders">Project Team</strong></td>
                <td><p> </p></td>
              </tr>
              <tr>
                <td><p>*Project Team Leader:<span id="spryselect1"><br />
                  <label for="projteamlead"></label>
                  <select name="projteamlead" id="projteamlead">
                    <option value="1">.... Select from list ....</option>
                    <?php
    do { 
    ?>
                    <option value="<?php echo $row_rsProjectTeam['fullname']?>"><?php echo $row_rsProjectTeam['fullname']?></option>
                    <?php
    } while ($row_rsProjectTeam = mysql_fetch_assoc($rsProjectTeam));
      $rows = mysql_num_rows($rsProjectTeam);
      if($rows > 0) {
          mysql_data_seek($rsProjectTeam, 0);
                $row_rsProjectTeam = mysql_fetch_assoc($rsProjectTeam);
    ?>
                  </select>
                </span></p></td>
                <td><p>*Deputy Team Leader:<span id="spryselect2"><br />
                  <label for="projteamlead"></label>
                  <select name="projdepteamlead" id="projdepteamlead">
                    <option value="1">.... Select from list ....</option>
                    <?php
    do { 
    ?>
                    <option value="<?php echo $row_rsProjectTeam['fullname']?>"><?php echo $row_rsProjectTeam['fullname']?></option>
                    <?php
    } while ($row_rsProjectTeam = mysql_fetch_assoc($rsProjectTeam));
      $rows = mysql_num_rows($rsProjectTeam);
      if($rows > 0) {
          mysql_data_seek($rsProjectTeam, 0);
                $row_rsProjectTeam = mysql_fetch_assoc($rsProjectTeam);
    ?>
                  </select>
                </span></p></td>
              </tr>
              <tr>
                <td><p>*Project Officer:<span id="spryselect3"><br />
                  <label for="projteamlead"></label>
                  <select name="projofficer" id="projofficer">
                    <option value="1">.... Select from list ....</option>
                    <?php
    do { 
    ?>
                    <option value="<?php echo $row_rsProjectTeam['fullname']?>"><?php echo $row_rsProjectTeam['fullname']?></option>
                    <?php
    } while ($row_rsProjectTeam = mysql_fetch_assoc($rsProjectTeam));
      $rows = mysql_num_rows($rsProjectTeam);
      if($rows > 0) {
          mysql_data_seek($rsProjectTeam, 0);
                $row_rsProjectTeam = mysql_fetch_assoc($rsProjectTeam);
    ?>
                  </select>
                </span></p></td>
                <td><p>*Liason Officer:<span id="spryselect4"><br />
                  <label for="projteamlead"></label>
                  <select name="projliasonofficer" id="projliasonofficer">
                    <option value="1">.... Select from list ....</option>
                    <?php
    do { 
    ?>
                    <option value="<?php echo $row_rsProjectTeam['fullname']?>"><?php echo $row_rsProjectTeam['fullname']?></option>
                    <?php
    } while ($row_rsProjectTeam = mysql_fetch_assoc($rsProjectTeam));
      $rows = mysql_num_rows($rsProjectTeam);
      if($rows > 0) {
          mysql_data_seek($rsProjectTeam, 0);
                $row_rsProjectTeam = mysql_fetch_assoc($rsProjectTeam);
    ?>
                  </select>
                </span></p></td>
              </tr>
            </table>
            <table width="600" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="300" id="moredetails2"> </td>
                <td width="300"> </td>
              </tr>
              <tr id="moredetails">
                <td width="300" id="moredetails"><strong id="subheaders">Meeting Dates</strong></td>
                <td width="300"><strong id="subheaders">Other Dates</strong></td>
              </tr>
              <tr id="formrows">
                <td width="300" id="formrows"><p id="dates">*1st  Meeting Date: <em>YYYY/MM/DD</em><span id="txt_projmeeting1"><br />
                  <input type="text" name="projmeeting1" id="projmeeting1" />
                </span></p></td>
                <td width="300" id="formrows"><p id="dates">*Project Start Date: <em id="formcells">YYYY/MM/DD</em><span id="txt_projstartdate">
                  <label for="projstartdate"></label>
                  <input type="text" name="projstartdate" id="projstartdate" />
                  </span>
                  <label for="projstartdate"></label>
                </p></td>
              </tr>
              <tr>
                <td width="300" id="formrows"><p id="dates">*2nd  Meeting Date: <em>YYYY/MM/DD</em><span id="txt_projmeeting2"><br />
                  <input type="text" name="projmeeting2" id="projmeeting2" />
                  </span>
                  <label for="projteam2"></label>
                  <label for="projmeeting2"></label>
                </p></td>
                <td width="300" id="formrows"><p id="dates">*Project End Date: <em>YYYY/MM/DD</em><span id="txt_projenddate"><br />
                  <label for="projenddate2"></label>
                  <input type="text" name="projenddate" id="projenddate" />
                </span></p></td>
              </tr>
              <tr>
                <td width="300" id="formrows"><p id="dates">*3rd Meeting Date: <em>YYYY/MM/DD</em><span id="txt_projmeeting3"><br />
                  <input type="text" name="projmeeting3" id="projmeeting3" />
                </span></p></td>
                <td width="300" id="formrows"><p id="dates">*MoU Signing Date: <em id="formcells">YYYY/MM/DD</em><span id="txt_projmousigndate"><br />
                  <label for="projmousigndate"></label>
                  <input type="text" name="projmousigndate" id="projmousigndate" />
                </span></p></td>
              </tr>
              <tr>
                <td colspan="2" id="formrows2"><div align="center" id="notice"><img src="images/notice.jpg" width="501" height="73" /></div></td>
              </tr>
            </table>
          </div>
          <p align="center"></p>
          <p align="center" id="text">
            <input type="file" name="file_upload" />
            <input type="file" name="file_uploadone" />
            <input type="file" name="file_uploadtwo" />
          </p>
          <p align="center" id="text">
            <input type="file" name="file_uploadthree" />
            <input type="file" name="file_uploadfour" />
            <input type="file" name="file_uploadfive" />
          </p>
          <p align="center">
            <input type="submit" name="submit" value="Save &amp; Submit"/>
          </p>
        </form>
    The addnew.php will now execute and add the data and image file names and path to MySQL database and upload the images to their various locations. it will also check the image file size be sure its not more than 100kb and must really be an iamge with format .jpg, .png and .gif.
    <?php
    if(isset($_POST['submit']))
              $projcode=$_POST['projcode'];
              $projname=$_POST['projname'];
              $projname=$_POST['projname'];
              $projdesc=$_POST['projdesc'];
              $projappdate=$_POST['projappdate'];
              $projcommunity=$_POST['projcommunity'];
              $projlga=$_POST['projlga'];
              $projstate=$_POST['projstate'];
              $projcost=$_POST['projcost'];
              $projtype=$_POST['projtype'];
              $projbaselinedata=$_POST['projbaselinedata'];
              $Projexpoutcome=$_POST['Projexpoutcome'];
              $adultmen=$_POST['adultmen'];
              $adultfem=$_POST['adultfem'];
              $totalchildren=$_POST['totalchildren'];
              $totalben=$_POST['totalben'];
              $projteamlead=$_POST['projteamlead'];
              $projdepteamlead=$_POST['projdepteamlead'];
              $projofficer=$_POST['projofficer'];
              $projliasonofficer=$_POST['projliasonofficer'];
              $projmeeting1=$_POST['projmeeting1'];
              $projmeeting2=$_POST['projmeeting2'];
              $projmeeting3=$_POST['projmeeting3'];
              $projmousigndate=$_POST['projmousigndate'];
              $projstartdate=$_POST['projstartdate'];
              $projenddate=$_POST['projenddate'];
              $name=basename($_FILES['file_upload']['name']);
              $t_name=$_FILES['file_upload']['tmp_name'];
              $dir='imageone';
              // Validate uploaded image file
              if ( !preg_match( '/gif|png|jpeg/', $_FILES['file_upload']['type']) ) {
                           die('<p>Only browser compatible images allowed</p></body></html>');
              } else if ( $_FILES['file_upload']['size'] > 100000 )
                           die('<p>Sorry file too large</p></body></html>');
              if(move_uploaded_file($t_name,$dir."/".$name))
                        echo 'File 1 uploaded successfully....!';
              else
                        echo 'File 1 upload failed or was not submitted....!  ';
              $nameone=basename($_FILES['file_uploadone']['name']);
              $t_name=$_FILES['file_uploadone']['tmp_name'];
              $dir='imagetwo';
              // Validate uploaded image file
              if ( !preg_match( '/gif|png|jpeg/', $_FILES['file_uploadone']['type']) ) {
                           die('<p>Only browser compatible images allowed</p></body></html>');
              } else if ( $_FILES['file_uploadone']['size'] > 100000 )
                           die('<p>Sorry file too large</p></body></html>');
              if(move_uploaded_file($t_name,$dir."/".$nameone))
                        echo 'File 2 was uploaded successfully....!';
              else
                        echo '...File 2 upload failed or was not submitted!  ';
              $nametwo=basename($_FILES['file_uploadtwo']['name']);
              $t_name=$_FILES['file_uploadtwo']['tmp_name'];
              $dir='imagethree';
              // Validate uploaded image file
              if ( !preg_match( '/gif|png|jpeg/', $_FILES['file_uploadtwo']['type']) ) {
                           die('<p>Only browser compatible images allowed</p></body></html>');
              } else if ( $_FILES['file_uploadtwo']['size'] > 100000 )
                           die('<p>Sorry file too large</p></body></html>');
              if(move_uploaded_file($t_name,$dir."/".$nametwo))
                        echo 'File 3 uploaded successfully';
              else
                        echo '...File 3 upload failed or was not submitted!  ';
              $namethree=basename($_FILES['file_uploadthree']['name']);
              $t_name=$_FILES['file_uploadthree']['tmp_name'];
              $dir='imagefour';
              // Validate uploaded image file
              if ( !preg_match( '/gif|png|jpeg/', $_FILES['file_uploadthree']['type']) ) {
                           die('<p>Only browser compatible images allowed</p></body></html>');
              } else if ( $_FILES['file_uploadthree']['size'] > 100000 )
                           die('<p>Sorry file too large</p></body></html>');
              if(move_uploaded_file($t_name,$dir."/".$namethree))
                        echo 'File 4 uploaded successfully';
              else
                        echo '...File 4 upload failed or was not submitted!  ';
              $namefour=basename($_FILES['file_uploadfour']['name']);
              $t_name=$_FILES['file_uploadfour']['tmp_name'];
              $dir='imagefive';
              // Validate uploaded image file
              if ( !preg_match( '/gif|png|jpeg/', $_FILES['file_uploadfour']['type']) ) {
                           die('<p>Only browser compatible images allowed</p></body></html>');
              } else if ( $_FILES['file_uploadfour']['size'] > 100000 )
                           die('<p>Sorry file too large</p></body></html>');
              if(move_uploaded_file($t_name,$dir."/".$namefour))
                        echo 'File 5 uploaded successfully';
              else
                        echo '...File 5 upload failed or was not submitted!  ';
              $namefive=basename($_FILES['file_uploadfive']['name']);
              $t_name=$_FILES['file_uploadfive']['tmp_name'];
              $dir='imagesix';
              // Validate uploaded image file
              if ( !preg_match( '/gif|png|jpeg/', $_FILES['file_uploadfive']['type']) ) {
                           die('<p>Only browser compatible images allowed</p></body></html>');
              } else if ( $_FILES['file_uploadfive']['size'] > 100000 )
                           die('<p>Sorry file too large</p></body></html>');
              if(move_uploaded_file($t_name,$dir."/".$namefive))
                        echo '    File 6 uploaded successfully';
              else
                        echo '....File 6 upload failed or was not submitted!  ';
              mysql_select_db ($database_XXXXXXXX,$XXXXXXXX); where XXXXXXXX is my database connection details. Please change to yours.
                        $qur=("insert into tbl_projects (projid, projcode, projname, projdesc, projappdate, projcommunity, projlga, projstate, projcost, projtype, projbaselinedata, Projexpoutcome, adultmen, adultfem, totalchildren, totalben, projteamlead, projdepteamlead, projofficer, projliasonofficer, projmeeting1, projmeeting2, projmeeting3, projmousigndate, projstartdate, projenddate, name, path, nameone, pathone, nametwo, pathtwo, namethree, paththree, namefour, pathfour, namefive, pathfive) VALUES ('', '$projcode','$projname','$projdesc', '$projappdate', '$projcommunity', '$projlga', '$projstate', '$projcost', '$projtype', '$projbaselinedata', '$Projexpoutcome', '$adultmen', '$adultfem', '$totalchildren', '$totalben', '$projteamlead', '$projdepteamlead', '$projofficer', '$projliasonofficer', '$projmeeting1', '$projmeeting2', '$projmeeting3', '$projmousigndate', '$projstartdate', '$projenddate','$name','imageone/$name','$nameone','imagetwo/$nameone', '$nametwo', 'imagethree/$nametwo', '$namethree', 'imagefour/$namethree', '$namefour', 'imagefive/$namefour', '$namefive', 'imagesix/$namefive')");
                        $res=mysql_query($qur,$XXXXXXXX);
    ?>
    Thank you. Hope this helps all those that are learning
    Message was edited by: Prince Mike

  • IE9 file upload using Open UI5

    Dear Experts,
    I am uploading a file from client to SAP ECC via Netweaver gateway. I have accomplished this using HTML5 for modern browsers. But i am facing challenges with legacy browsers that do not support HTML5.
    Example: IE9, few versions of IE10.
    Please clarify on below doubts.
    1.Does UI5 support uploading file to Netweaver gateway server from IE9 browser?
    2.Also is it integrate/Extract file upload plugin js files(ONLY) from UI5 into a custom webapp which is already using Jquery + HTML5 + Cusom CSS?
    Please suggest.
    Any help is appreciated.
    Regards
    Prabaharan

    Hi Nel,
    Check the below forum discussion.
    Upload Files into Database
    rgds
    s

  • File upload using uiXML and Struts

    Hi,
    I am using Struts as my controller component with uiXML for the UI. I need to add file upload functionality to one of my pages. After a bit of trial-and-error, I figured out that the following code in my uiXML sets me in the right direction -
    <struts:form name="myForm" method="post" beanName="myFormBean" usesUpload="true" destination="/try/SaveTry.do">
    When the "destination" attribute is not specified, the Struts action does not get the file. However, with the changes above, the uploaded file now reaches my Struts action, which does the necessary processing and the Struts controller forwards the control to the next page according to its logic.
    However, at this point, I see the following on the browser -
    java.io.EOFException
    at oracle.cabo.share.util.MultipartFormHandler._readLine(MultipartFormHandler.java:207)
         at oracle.cabo.share.util.MultipartFormHandler._readLine(MultipartFormHandler.java:192)
         at oracle.cabo.share.util.MultipartFormHandler._skipBoundary(MultipartFormHandler.java:176)
         at oracle.cabo.share.util.MultipartFormHandler.<init>(MultipartFormHandler.java:82)
         at oracle.cabo.share.util.MultipartFormHandler.<init>(MultipartFormHandler.java:59)
         at oracle.cabo.servlet.io.BaseFileUploadManager._doMultipartRequest(BaseFileUploadManager.java:93)
         at oracle.cabo.servlet.io.BaseFileUploadManager.decodeMultipartRequest(BaseFileUploadManager.java:57)
         at oracle.cabo.servlet.AbstractPageBroker.decodeMultipartRequest(AbstractPageBroker.java:534)
         at oracle.cabo.servlet.PageBrokerHandler.handleRequest(PageBrokerHandler.java:103)
         at oracle.cabo.servlet.UIXServlet.doGet(UIXServlet.java:170)
         at oracle.cabo.servlet.UIXServlet.doPost(UIXServlet.java:139)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:810)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:220)
         at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
         at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:810)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    I tried to specify my own file upload manager (which does nothing) and also tried to subclass the UIXPageBroker to return false in shouldHandleUploadFile() and null in decodeMultipartRequest(), all to no avail.
    Could somebody please let me know if I am missing something? Why is the AbstractPageBroker still kicking in after my file upload has been processed?
    Thanks in advance,
    Smarto

    Thanks Kennethkawamoto2, now i knew the reason, but still i am getting error for crossdomain.xml , when moving flash on production.
    I am putting it as below,
    Security.loadPolicyFile('xmlsocket://ipaddress:80/crossdomain.xml');
    can anybody help?
    much appreciated,
    Meghana

  • File upload use pl/sql with OAS 4082 and 8i/EE

    is there any way to upload/download files (any format) from web browser use FORM and above env. Don't mention samples in OAS document, it simply doesn't work. thanks.

    806675 wrote:
    I probably wrong but I interpret this as POST is not supported, http://download.oracle.com/docs/cd/E11882_01/appdev.112/e16659/xdb22pro.htm#ADXDB5550, "Supported HTTP(S) Client Methods"
    It says:
    "+The semantics of these HTTP(S) methods is in accordance with WebDAV. Servlets and *Web services may support additional HTTP(S) methods*, such as POST.+" (my emphasis - so yes, it is supported).
    Today we are using an Appserver with HTTP mod_plsql, the code for the form looks like:
    htp.formopen (
    curl => 'FileUpload',
    cmethod => 'POST',
    cenctype => 'multipart/form-data');
    the "FileUpload" takes care of the file and inserts it in the dbThe question is how does it do it? A file upload via mod_plsql/EPG is done via the PLSQL document table. It, mod_plsql/EPG, takes cares of the actual upload part - reading the Mime stream of the upload from the browser and inserting it into the document table.
    Unfortunately, seems that the 11g documentation lacks details in this regard. Please consult the Oracle® HTTP Server mod_plsql User's Guide (10g).
    <li>section 1.7.1 describes the format of the upload table you need to define
    <li>section 1.7.4 shows a sample HTML form doing a HTTP post, and the post-process upload PL/SQL procedure that needs to be written to process the contents of the row just created for the uploaded file in the document table

  • HTML File Upload - using DAD - Error

    I have set up my document table, the document upload package is in there, but my HTML for the file upload is not working correctly:
    DAD info
    DAD Name: /pls/portal
    Document Table: dw_target.documents
    Document Access Procedure: document_api.download
    here is the upload HTML:
    <html>
    <head>
    <title>test upload</title>
    </head>
    <body>
    <form enctype="multipart/form-data" action="http://MYURL:7777/portal/pls/portal/dw_target.document_api.download" method="post">
    File to upload: <input type="file" name="file"><br>
    <input type="submit" value="Upload">
    </form>
    </body>
    </html>
    But i get this error when i try to upload a doc:
    The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
    anyone have any insight on how to get the file upload to work (specifically how to configure the HTML to correctly use the upload process?
    using Oracle App Server 10g
    jason

    Pschar,
    What is "dw_target.documents"?
    Joel

Maybe you are looking for

  • Disable change logs for initial load

    Hi all, I need to do an initial load of many service tickets. In order to improve the performance (and only for this initial load) I would like to disable the change logs (to avoid storing information in the tables CDPOS and CDHDR). Any idea how to d

  • Scanning from HP 6500A+ to MacBook Pro

    I have a new HP 6500A+ all-in-one printer and cannot get the scanning option to work.  I spent a long time on the phone with the very patient HP support guy who had me installing and uninstalling and reinstalling drivers and software, but he could no

  • 10.5.7 breaks RDC and Exchange 2007 connectivity?

    I just installed 10.5.7 and now I find I cannot receive mail from our Exchange 2007 server (Entourage 2008) or connect to our file server (SBS 2008 standard). I only found one mention of this anywhere else (http://www.macfixit.com/article.php?story=2

  • Adobe master collection CS6 retina display

    Is the adobe suite master collection CS6 compatible with my mac OS retina display

  • Shared iTunes, Separate Play Lists, Separate iCloud

    My iTunes is on our family PC. I own a MacBook Air and an iPod Touch. My daughter has an iPod Touch. We want separate iCloud, but shared iTunes accounts. How do we do this? Right now we share an Apple ID.