Problem uploading file from mobile device to tomcat server

Hi guys, here's how it goes.
I'm designing a site using JSP for wireless devices like PDAs, Smartphones etc, basically any mobile device that has browser capabilities. There's a page where the user is allowed to upload a file from the mobile device, which works perfectly fine when I access the site using a PC. But when I try to upload a file from a mobile device, ( I tried using a Nokia 6680 ) , there wasn't any error but the file just wasn't stored in my server.
Here's how the upload form looks like :
<FORM name="filesForm" action="ProcessFileUpload.jsp" method="post" enctype="multipart/form-data">
        <font size="1" face="arial">File :</font><br>
<input type="file" name="file1" size="10" style="font-size: 9px;"/><br><br>
        <input type="submit" name="Submit" value="Upload Files" style="font-size: 9px;"/>
    </FORM>Here's the gist of ProcessFileUpload.jsp:
<%
     System.out.println("");
        System.out.println("Content Type ="+request.getContentType());
        DiskFileUpload fu = new DiskFileUpload();
        // If file size exceeds, a FileUploadException will be thrown
        fu.setSizeMax(1000000);
        List fileItems = fu.parseRequest(request);
        Iterator itr = fileItems.iterator();
        while(itr.hasNext()) {
          FileItem fi = (FileItem)itr.next();
          //Check if not form field so as to only handle the file inputs
          //else condition handles the submit button input
          if(!fi.isFormField()) {
            System.out.println("NAME: "+fi.getName());
            System.out.println("SIZE: "+fi.getSize());
            System.out.println(fi.getOutputStream().toString());
           // File fNew= new File(application.getRealPath("/"), fi.getName());
         File tempFileRef  = new File(fi.getName());
         File fNew = new File(filepath.toString(),tempFileRef.getName());
     String MM_Overall_DRIVER = "org.gjt.mm.mysql.Driver";
     String MM_Overall_USERNAME = "****";
     String MM_Overall_PASSWORD = "*********";
     String MM_Overall_STRING = "jdbc:mysql://localhost:3306/";
     Driver DriverRecordset1 = (Driver)Class.forName(MM_Overall_DRIVER).newInstance();
     Connection ConnRecordset1 = DriverManager.getConnection(MM_Overall_STRING,MM_Overall_USERNAME,MM_Overall_PASSWORD);
     PreparedStatement StatementRecordset1 = ConnRecordset1.prepareStatement("use " + domain);
     ResultSet Recordset1 = StatementRecordset1.executeQuery();
     filepath.append("/").append(tempFileRef.getName());
     StringBuffer fp = new StringBuffer("insert into ");
     fp.append(domain).append(".filepaths (path) values ('").append(filepath).append("')");
     PreparedStatement ps = ConnRecordset1.prepareStatement(fp.toString());
     ps.executeUpdate();
            System.out.println(fNew.getAbsolutePath());
            fi.write(fNew);
          else {
            System.out.println("Field ="+fi.getFieldName());
        }Basically I store the file uploaded in the tomcat server and the path of the file is saved in a table in MySQL.
When I upload a file using a PC, the tomcat console displays the content type file name yada yada yada. However, when I upload a file from the Nokia 6680, I get just the content type then things just stop there and nothing else happens. No file name no file size whatsoever. The path of the file is not inserted into MySQL and the file is not stored in the server.
Can anyone please enlighten me on this issue and hopefully gimme a solution to this problem? Your help will be greatly appreciated.

-bump-
HELPP!?!?!?!?!

Similar Messages

  • Problem uploading files from Dreamweaver CS3 to Yahoo

    I am having a problem uploading files from Dreamweaver CS3 to
    an FTP site on Yahoo.
    The error message I get is "No response from server.
    Reconnecting..."
    I am able to connect to Yahoo using other FTP clients
    successfully.
    I am able to connect to Yahoo using Dreamweaver MX 2004
    successfully.
    I tried playing with various settings (i.e. passive ftp,
    server compatibility options) but to no avail.
    Any thoughts on this would be appreciated.
    Thank you,
    Steven

    I tried enabling passive FTP but it doesn't help.

  • How to upload file from a client machine to server machine

    hei evryone!
    can anyone pls help me on how i can upload file from a client machine to another machine (or server). using jsp.Then later on, i can also retrieve the names of these files to place it as values for option tag in an html form.I have a seperate screen for uploading the file and the screen for displaying all the files that were uploaded on the server...
    any sample code/ ideas would be much appreciated.Thx!!!!

    hei evryone!
    can anyone pls help me on how i can upload file from a client machine to another machine (or server). using jsp.Then later on, i can also retrieve the names of these files to place it as values for option tag in an html form.I have a seperate screen for uploading the file and the screen for displaying all the files that were uploaded on the server...
    any sample code/ ideas would be much appreciated.Thx!!!!

  • JSP to Upload file from client machine to Web Server!

    Hi,
    I want to upload a file from client machine to web server in order to send it as email attachment, How can I do it? After uploading the file the class should give me the path where the file is stored on the web server and the file name in return!
    I know the HTML <file> field but dont know how to copy it on web server, HTML Part will be:
    <FORM ENCTYPE="multipart/form-data"
    method="POST" action="My.jsp">
    <INPUT TYPE="file" NAME="mptest">
    <INPUT TYPE="submit" VALUE="upload">
    </FORM>
    Please help!
    Thanks,
    - Rahul

    You can use cos.jar provided by O'Reilly from http://www.servlets.com/cos/. Take a look at com.oreilly.servlet.multipart.* classes.
    Package is provided with source, classes, documentation and, of course, ready-to-use jar file.
    It is really usefull and - ready!

  • Unable to upload files from local computer to remote server (Was: Dreamweaver)

    I have lost the connection between the remote location and the local location for files on my computer. Where to I correct this issues, since I cannot upload files from local to remote. Host server from server to my computer works fine, Running Dell computerr XP operating system with CS3 Dreamweaver. Need all the help I can get.

    I am now having a "ftp error - cannot make connection to host. Dreamweaver
    encoutered a netwoerk or file system error. I did as you suggested and I
    get to basic site definition, ( which looks o.k.), next screen ( no,I do
    not want to use a server technology) Next screen ( edit local copies on my
    machine ( file location looks o.k.), next screen (connect to remote
    server=ftp) address of web server is correct, ( no folder on server, or ftp
    login or ftp password) do not enable check in or check out
    summary: local
    Site name:midhba
    local root folder:midhba
    remote info:
    access; ftp
    FTP host: midhba.com
    check in.check out diabled
    testing server (set up later)

  • Upload image from Mobile device using SAP ui5 controls

    Hello Team ,
    Can we use SAP UI5 controls to upload image from photo gallery of the mobile device, the idea is to use simple sap UI5 codding and not SMP.
    please do let me know if you guys have idea on same.
    Armaan 

    Hi Armaanjit,
    Please have a look at my post
    File upload using SAPUI5 Control

  • Third party apps to upload files from ios devices?

    Suppose you have a resume saved on your ipad or iPhone.  You go to apply to a job online.  The company website wants you to upload a resume.  Upon selecting the upload button you only have the option of uploading pictures or videos.  Is there a third party app that allows the ipad to be turned into a disk drive.  I can do this on my Android devices.   I am considering switching back to apple and need to know if I can do this crucial procedure.  Please advise. 

    Alfred DeRose wrote:
    No, iOS does not provide a way to upload anything uther than pictures and video. There is no user accessible file system on iOS and therefore no apps that will be able to do what you are asking.
    Actually that is completely worng. There Are Apps that let you do this.
    For uploads to websites you'll need to use a 3rd party browser than can store your files with in its file area.
    iCab Mobile is suggested here often.
    https://itunes.apple.com/en/app/icab-mobile-web-browser/id308111628

  • Upload image from mobile device by using J2ME

    Dear all.
    I would like to upload the png image to the server.. but I don't know how to do. Is it possible to do so? what should I do?? anyone can help me????
    thanks all experts..~~!

    From Example using POST with HttpConnection in javax.microedition.io.HttpConnection:
        void postViaHttpConnection(String url) throws IOException {
            HttpConnection c = null;
            InputStream is = null;
            OutputStream os = null;
            int rc;
            try {
                c = (HttpConnection)Connector.open(url);
                // Set the request method and headers
                c.setRequestMethod(HttpConnection.POST);
                c.setRequestProperty("If-Modified-Since",
                    "29 Oct 1999 19:43:31 GMT");
                c.setRequestProperty("User-Agent",
                    "Profile/MIDP-2.0 Configuration/CLDC-1.0");
                c.setRequestProperty("Content-Language", "en-US");
                // Getting the output stream may flush the headers
                os = c.openOutputStream();
                os.write("LIST games\n".getBytes()); // Replace with PNG bytes
                os.flush();           // Optional, getResponseCode will flush
                // Getting the response code will open the connection,
                // send the request, and read the HTTP response headers.
                // The headers are stored until requested.
                rc = c.getResponseCode();
                if (rc != HttpConnection.HTTP_OK) {
                    throw new IOException("HTTP response code: " + rc);
                is = c.openInputStream();
                // Get the ContentType
                String type = c.getType();
                processType(type);
                // Get the length and process the data
                int len = (int)c.getLength();
                if (len > 0) {
                     int actual = 0;
                     int bytesread = 0 ;
                     byte[] data = new byte[len];
                     while ((bytesread != len) && (actual != -1)) {
                        actual = is.read(data, bytesread, len - bytesread);
                        bytesread += actual;
                    process(data);
                } else {
                    int ch;
                    while ((ch = is.read()) != -1) {
                        process((byte)ch);
            } catch (ClassCastException e) {
                throw new IllegalArgumentException("Not an HTTP URL");
            } finally {
                if (is != null)
                    is.close();
                if (os != null)
                    os.close();
                if (c != null)
                    c.close();
        }

  • Upload File from oracle table to FTP server .

    Hi Experts,
    I have created one html region in Apex page. In this Region I have one item as File browse. On Click of File browse , select some file and say click Submit button then I m storing this file information in Table. Now My Requirement is to upload this file to FTP server after clicking the Submit button.
    Thanks in Advance
    Danalaxmi

    For this you need the ftp package you can find on this page:
    http://www.oracle-base.com/dba/DBACategories.php
    George

  • How to upload file from client to server in servlets.

    actually in my application i have to upload file from client m/c to server.
    it is not possible through file i/p stream as fileStreams does not work on network. Please mail me if you have any solution to this.
    Thank's in advance............

    Haii roshan
    Pls go through this thread..
    http://forum.java.sun.com/thread.jspa?forumID=45&threadID=616589
    regards
    Shanu

  • I have a problem with my apple mobile device support file

    Hey guys!
    i'm really having a problem with my apple mobile device..
    whenever i connect my cable to my computer WITHOUT the apple mobile device support file/program..my ITOUCH can sync and it WORKS!
    but ITUNES doesnt sync in with my itouch because ITUNES doesn't work without the apple mobile device support program.. SO...
    i reinstalled my ITUNES
    i reinstalled my mobile device support file/program
    i even  changing it to AUTO (what they said about control panal, program, service, thingy)
    I RESTARTED everything.. i think i did almost everything there is in apple support!
    with NO LUCK! was it able to connect my computer.. UNLESS i take the apple mobile device support program OUT! @.@
    i really need your help guys D:
    P.S i dont have a Virus! i have a really good computer that is stable, so i'm certain i dont have a virus doing this.. but do you happened to know why it's causing this? Also how can i fix it?
    BTW.. IT IS A CODE 52 i don't know what that means..
    PLEASE AND THANKS YOU GUYS~ <3

    All I can suggeset is:
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
    or
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    Have you looked at the AMDS topic of:
    iOS: Device not recognized in iTunes for Windows
    Do you have han image capture programs linstalled like for a camers or scanner?

  • I want to upload some files from mobile phone to webserver? how? thanks!

    I want to upload some files from mobile phone to webserver? how? thanks!

    The vibrating phone was created in Java. Some british company is selling the program to women for on the go fun. I'm pretty sure the actual code in the program is only a few lines.
    Oh... you were talking to the other guy. He wants a java app to upload something to a JSP or database server.

  • Adobe Bridge CC cannot obtain files from this device.

    I am getting this error message when I attempt to upload videos to my Mac from my Canon 7D:
    Adobe Bridge CC cannot obtain files from this device. Please be sure the device is properly plugged in and the battery is full charged.
    Battery is full charged and camera is connected properly. I have restarted the camera, Bridge, and the computer as well. I tried reinstalling Bridge and it allowed me to upload 3 of the video files. Then the error message came back. There were a few RAW images on the camera that I was able to upload, but when I tried the video again I got the error message. I read a post about renaming the folder that you are saving to as a fix. I tried that as well, but it did not work.
    Any help would be greatly appreciated! Thanks!
    -J

    This excerpt is from a long-gone post by author Bruce Fraser:
    Bruce Fraser - 4:17pm Jun 14, 04 PST (#5 of 21) Opening files directly from the camera is a bad idea for a variety of reasons*, and it most certainly isn't faster than using a FireWire or USB2 card reader. 
            • Drains the camera battery
            • Runs the risk of the software you're using to open the images writing to the card and destroying the format
            • Runs a small but significant risk of USB power frying the camera
    • runs the risk of wearing out the camera's connector,      
    • Slowest method known to mankind of getting images off a CF or SD card

  • Transferring files from Multiple Devices to 1 ITunes Account

    I have three Apple devices, an ITouch, an IPhone and an IPad and one ITunes account.
    I'm trying to fill my Itunes library with all my files from each of my devices, the files differ so on one I have a tv series the other two don't have this, then I have albums I've imported from CD's on my IPad but they're not on my computer or other device as I have a new computer.
    Is it possible to transfer all files from each device to my itunes ? If so how ? The only options I can seem to find is to update the Idevices from my Itunes and not the other way around ?

    No problem, it is still much the same advice but you'll need to use third party tools to extract the data.
    See this post from forum regular Zevoneer for some options.
    If there is a chance that you've got some overlap you might want to use my DeDuper script. See this  thread for background.
    tt2

  • Adobe Bridge cs5 cannot obtain files from this device.

    I download photos to my computer using a Kingston downloading device.
    Since installing Mavericks the above message comes up and will not carry out the download.
    Is this a known problem with Mavericks and is there a remedy?
    I would say that using the same device my photos download perfectly on my MacBook Pro.
    Messages
    1. Adobe Bridge CS5.1 cannot obtain files from this device.
    Please ensure that the device is connected properly and that the battery is charged and try again.
    2.I also get a message telling me that the "disk was not ejected propery" which is not the case.

    Thanks Eric
    The MacBook Pro is not running Mavericks and sorry about the double post.
    I have actually solved the problem and the answer might be of use to others with the same problem.
    There is a firmware update that will correct the problem.
    It's at
    http://www.kingston.com/en/support/technical/products?model=fcr-hs3
    There is a small catch in  that the firmware update can only be done on a Windows machine but I have been told that once this is done it can be used with OSX9 .I have just done the download but  I haven't checked this out yet.

Maybe you are looking for

  • How do I access iWeb and iDVD on my new Macbook Air?

    I just bought a new MacBook Air and read that I can load iPhoto 11, iMovie 11, and GarageBand from the app store, which I did. I don't see iWeb or iDVD anywhere, on the MacBook or in the app store. I guess iWeb and iDVD are part of the iLife 11 packa

  • CS5.5 upgrade or just InDesign upgrade?

    I just downloaded a trial upgrade for InDesign CS5.5.  It looks like I need to run that in order to work in my new Lion environment. Does anyone know if it's worth upgrading the full suite? It doesn't look like my other workhorses, Illustrator and Ph

  • A good keyboard driven file manager with thumbnails?

    Does anybody know a good keyboard driven file manager with thumbnails? I've been looking for one but the only keyboard driven file managers I can find uses cli.

  • Adobe Reader Activation requires administrative rights

    I open a pdf file to read and it times out with a message and than shuts down. The message say log in as adminstrator and try again or contact your system administrator. Well I am the system administrator and I do not have my computer set up to log i

  • Desktop software v5 does not detect BB 8330, tried everything...

    Hi! I an absolutely new to the forum and seeking some help to troubleshoot my Desktop to BB connection. I've had it working on my Desktop (XP Pro 2002, SP2) with DM 5.0 + BB (8330) w version 4.5.0.160 (platform 3.4.0.41) A few days ago, out of the bl