Problem Opening a Page!

Hello,
I seem to be having a problem with an FTP Upload program. Its very simple and pointless but im trying to learn how to make one.
The problem is, I have users who input data in a textfield (Yes its a Swing application). And when they input all data they click the "Connect" button. Unfortunatly, when a user inputs the data and presses Connect, nothing happens. Perhaps someone can take a look at the source codes and explain to me why im getting the problem and how to solve it? :)
It would be greatly appreciated, thank you!
http://www.projectevolution.comoj.com/ftpuploadsc.html
(Copy and paste it and place in Wordpad so its readable)
*~ Project Evolution*

public void upload() throws MalformedURLException, IOException
    String ftpServer = ftpUserServer.getText();
    String ftpUser = ftpUsername.getText();
    String ftpPassword = ftpPass.getText();
    String ftpFileName = ftpFile.getText();
    File ftpSource = new File (ftpSourceDownload.getText());
    // if the server, username and password arent null, execute...
    if (ftpServer != null && ftpFileName != null && ftpSource != null) {
    StringBuffer sb = new StringBuffer("ftp://"); // begins the StringBuilder...
    // with "ftp://", then adds 16 empty elements
    if (ftpUser != null && ftpPassword != null) {
    sb.append(ftpUser); // appends the username
    sb.append(':'); // appends : to seperate username from pass
    sb.append(ftpPassword); // appends password
    sb.append('@'); // seperates password from host
    sb.append(ftpServer); // FTP server address
    sb.append('/'); // seperates with a /
    sb.append(ftpFileName); // filename. example: Directory/file.txt
    sb.append(";type=a"); // appends, also includes upload in ASCII mode
    BufferedInputStream bufferis = null; // sets input stream to nothing
    BufferedOutputStream bufferos = null; // sets output stream to nothing
    try {
        System.out.println("Connection Successful!");
    URL url = new URL(sb.toString()); // converts all sb.append names to a string
    URLConnection urlcon = url.openConnection(); // connects to the URL using the openConnection method
    bufferos = new BufferedOutputStream(urlcon.getOutputStream());
    bufferis = new BufferedInputStream(new FileInputStream(ftpSource));
    int i;
    // read byte by byte until end of stream
    while ((i = bufferis.read()) != -1)
    bufferos.write(i);
    finally
    if (bufferis != null)
    try
    bufferis.close();
    catch (IOException ioe)
    ioe.printStackTrace();
    if (bufferos != null)
    try
    bufferos.close();
    catch (IOException ioe)
    ioe.printStackTrace();
    else
    System.out.println("Input not available.");
    }

Similar Messages

  • Problems opening JSP pages through netbeans

    I recently upgraded from netbeans 5.5RC1 to netbeans 5.5 and am no longer able to open JSP pages. I am still able to edit java pages and I am still able to compile/build packages, however I get the following error when attempting to open the JSP pages. Any input/help would be appreciated.
    Thanks,
    java.lang.StackOverflowError
         at java.io.Win32FileSystem.normalizePrefix(Win32FileSystem.java:76)
         at java.io.Win32FileSystem.normalize(Win32FileSystem.java:107)
         at java.io.Win32FileSystem.normalize(Win32FileSystem.java:170)
         at java.io.File.<init>(File.java:196)
         at org.netbeans.modules.masterfs.ResourcePath.getFile(ResourcePath.java:64)
         at org.netbeans.modules.masterfs.MasterFileObject.isValid(MasterFileObject.java:86)
         at org.netbeans.modules.masterfs.Cache.get(Cache.java:68)
         at org.netbeans.modules.masterfs.Cache.getOrCreate(Cache.java:89)
         at org.netbeans.modules.masterfs.MasterFileObject.getParent(MasterFileObject.java:537)
         at org.openide.filesystems.FileUtil.isParentOf(FileUtil.java:971)
         at org.netbeans.modules.java.freeform.Classpaths.findClassPathImpl(Classpaths.java:139)
         at org.netbeans.modules.java.freeform.Classpaths.access$000(Classpaths.java:85)
         at org.netbeans.modules.java.freeform.Classpaths$1.run(Classpaths.java:123)
         at org.openide.util.Mutex.readAccess(Mutex.java:227)

    This happens very frequently during development, I just do ctrl+F5 in IE to keep refreshing till I finally get a response back from the jsp or servlet... usually it takes about 2-4 refreshes to get the jsp to respond and after that its smooth till you change the jsp or restart Apache. Also this problem, in my experience, is associated with Apache forwarding requests to OSE via mod_ose and I dont see this problem if I access the jsp directly using the database listener http endpoint.
    Hope this helps.

  • I am having problems opening a page needing flash player

    I have been utilizing firefox to complete my assignments from Mypearsonlabs for over 6 months now. I have never had a problem before. But now everytime i try to open a link from that page, it keeps telling me that i need the latest version of flash player. i have downloaded, and even done a clean uninstall for the flash player, i have tried to open the site on a different computer using firefox, i have refreshed firefox. Now the page opens in explorer but it will not open in firefox.
    Please do provide me with a solution. I prefer using firefox and would hate to switch to another browser.
    Thank you

    You can find the latest Flash player versions for Firefox on this page:
    *http://www.adobe.com/special/products/flashplayer/fp_distribution3.html
    You can uninstall the current Flash player version and (re)install the latest Flash version.
    See this about uninstalling Flash players:
    *http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-windows.html
    Note that this will remove all installed Flash players.

  • PROBLEM OPENING WEB PAGES

    Some pages won't open on my mac, no matter what web browser I use. Safari says it can't establish a secure connection, and the other two I've used, CHROME and Firefox, say there was an error loading the page. I can't check my email in gmail or netflix. HELP PLEASE

    I ve been having the same problem since I ve got my Mac 3 months ago brand new so I dont think that it comes from anything recently installed, the version is 10.7.4.
    The problem is the same even if I change location and use the internet elsewhere, I normally use wifi both at uni and at home. I dont have any third part programs besides chrome that installed to see if it solved the problem.
    The only pages I had problem with is netflix which opens normally but then it doesnt play the contents saying it could not stablish a connection, my uni e-mail is through g-mail and it doesnt open as well.
    Thanks Nay

  • Safari problem opening pages

    why the heck safari on and off have problems opening secure pages of bank sites. I previously had problems with bank.marksandspensers.com and now with bank.barclays.com, when at the same time these pages could be opened in chrome. The error displayed is a normal page not found / server not available / server closed connection. It is very irritating. I use Trusteer and it is not available for Chrome on OS X.

    Trusteer Rapport Uninstall

  • Pages will not open a Pages document

    I made a Pages document on my computer at home (iMac 10.4.8) and I am wanting to open the same document on my computer at work (eMac 10.4.10). I get a message simply stating that the document "could not be opened." Why will my document open in Pages on one computer and not on the other? I have iWork on both computers. Any help will be appreciated!

    There shouldn't be a problem opening a Pages document with the same major version number but different sub-numbers. But, you can't open a Pages 3 document in Pages 1 or 2 or a Pages 2 document in Pages 1. In Pages 2 there is an option in the Save dialog to save as iWork '05 (Pages 1) & Pages 3 has the option of saving as iWork '05 or iWork '06.

  • Unable to open a Page document on another computer

    I used Page to create a document and then emailed it to my home to continue working. I have Page on this computer, but when I try to open I get the message -- Unable to open “Gardiner List.pages” because it isn't a valid Pages document.

    I have just had the same problem. Another Mac user sent me a Pages 09 file that had been saved in Pages 08 format, but I could not open with my Pages 08. Then he sent me a Pages 08 file he created and I could not open that either. He also sent me a DOC version of the file, which I could open in Pages 08. Also, he had no problem opening a Pages 08 document that I sent him. Help.

  • RE: [Adobe Reader] when i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ? i

    HelloThank's for your helpsI hope this document is helpfulBest Regards,
    Date: Sun, 22 Jun 2014 17:10:17 -0700
    From: [email protected]
    To: [email protected]
    Subject:  when i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ? if you can help me th
        when i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ? if you can help m
        created by Anoop9178 in Adobe Reader - View the full discussion
    Hi,
    Would it be possible for you to share the document?
    Regards,
    Anoop
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6485431#6485431
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
         To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Adobe Reader by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

    thank's for reply and your help
    i did the step's that you told me but  i still have the same problem
                                     i have the latest v.11.0.7
    i
    i disable the protected mode

  • I am having problems opening pages in safari. the rotating wheel at the right end of the address window doesn't stop even after the page has filled up. then if i try to open other pages it gets stuck and won't open them.

    I started having problems opening pages today. When first open a page it seems to download the page OK, but the rotating wheel on the right-hand end of the address field keeps rotating after the page is completely filled up. Then if I try to open other pages it becomes slower and eventually stops filling-in the pages, while the rotating wheel keeps rotating.
    I wonder whether junk is being downloaded into my mac, or what is going on. Help will be geatly appreciated.

    When was the last time you emptied the Safari cache?
    From your Safari menu bar click Safari > Empty Cache
    If that didn't make a difference, go back to the menu bar click Safari > Reset Safari. Select the top 5 boxes then click Reset.
    And how much free space on the startup disk?
    Right or control click the MacintoshHD icon. Click Get Info. In the Get Info window you will see Capacity and Available. Make sure you always have a minimum of 15% free disk space. Freeing Up Hard Disk Space - Mac Guides
    If emptying cache or resetting didn't help and there's enough free space on the startup disk, login to another user account, launch Safari. Same problems there indicates a system wide problem. Log back into your admin account so you can check the startup disk.
    Launch Disk Utility. /Applications/Utilities
    Select MacintoshHD in the panel on the left then select the First Aid tab.
    Click: Verify Disk (not Verify Disk Permissions)
    If the startup disk needs repairing, follow the instructions for Using Disk Utility to verify or repair disks
    I wonder whether junk is being downloaded into my mac
    Nothing should "download" to your Mac unless you initiate the download yourself. You can check the Downloads folder from the Safari > Window menu or your Downloads folder in the Finder.

  • Im having a problem with Firefox opening web pages that i have set as my home page such as Google also will not open Yahoo but will open most bookmarked pages

    After starting Firefox the Firefox homepage comes up with the google search, but if i enter anything in the search bar, nothing happens it just says done. Also my homepage is Google, imported from Internet Explorer, but doesn't come up when i start Firefox, And Also at the top on the tab it just says untitled. Now with that being said if i enter in yahoo or yahoo.com in the search tab or even enter in the actual web address, it still doesn't open it just says done at the bottom of the page and nothing happens, But if i go to the Bookmarks also imported from Internet Explorer it will open or display most all of the web pages it just seems to be having problems with search engines such as Google, and Yahoo. Now if i enter Ask.com in the web address search tab it will open that page but if i enter Google.com or Yahoo.com nothing. Also like i said most all bookmarks will open but yahoo or my yahoo that is saved in Bookmarks will not. and nothing happens with any entry made into the Google search displayed on the the Firefox Start Page.

    Hi,
    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!

  • When i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ? if you can help me th

    when i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ?
    if you can help me thank's
    [email address removed by host]

    thank's for reply and your help
    i did the step's that you told me but  i still have the same problem
                                     i have the latest v.11.0.7
    i
    i disable the protected mode

  • Firefox crashing when i wanna open or close a tab or a window, also while wanna open any page, now what to do for solving the problem?

    Firefox crashing when i wanna open or close a tab or a window, also while wanna open any page, now what to do for solving the problem?

    Disable McAfee siteadvisor and check the problem still persist or not?

  • TS3274 I am having problems with Safari  It keeps coming up with Safari could not open the page because the server stopped responding, when I click on Safari  How can I remedy this WiFi is OK.

    When I turn on my Ipad and click on Safari it says  Safari could not open the page because the server stopped responding.but I can get on internet with Google Chrome.   What is the problem and how can I repair it?

    Found the answer in the more like this panel and now working.  Thanks.
    But have 3 updates waiting in Apps but it is taking ages to update them and cannot get onto Apps by clicking Apps on the desktop.screen.

  • When i try to open a web page, a blue screen appears and it is telling me " safari cannot open the page because i am not connected to the internet. i have an iphone, no problem and a laptop with connection - no problem - not sure what the trouble is.

    when i try to open a web page, a blue screen appears - message says - sarfari cannot open the page because it is not connected to the internet. i have an iphone - no proble and a laptop - no problem as well.
    what is wrong?

    There are other things that need attention:
    Your above posted system details show outdated plugin(s) with known security and stability risks that you should update.
    *Shockwave Flash 10.0 r32
    Update the [[Managing the Flash plugin|Flash]] plugin to the latest version.
    *http://www.adobe.com/software/flash/about/

  • When opening any page associated with Google (main search page, gmail, google maps, etc) the font is so tiny it is unreadable. Any other website is fine and this only happens with Mozilla. I just downloaded 3.6.12 and it's still a problem.

    When opening any page associated with Google (main search page, gmail, google maps, etc) the font is so tiny it is unreadable. Any other website is fine and this only happens with Mozilla. I just downloaded 3.6.12 and it's still a problem.

    Reset the page zoom on pages that cause problems: <b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)
    * http://kb.mozillazine.org/Zoom_text_of_web_pages

Maybe you are looking for