Opening a web page through my J2ME application.

Hi All,
I am creating a j2me application, that has to connect to the server online and open a page on that server, and then upload a file at a particular location in that server.
I am using Nokia 6681. I was exploring it, but since I have very less time, I am posting a query here also.
If this is possible (opening a connection with a server - I have the IP address of the server and also the path to that page), and display that page on my cell phone from within the j2me application.
Is this somehow related to JSR-172 (Which is not supported on Nokia 6681).
If this is not possible this way, Is there any way I can upload that file to the server from within the application.
Urgent help is required.
Thanking you in anticipation
Ashish

Just compile and run the testVisit program as follows:
java testVisit http://www.yahoo.com
testVisit.java
==========
import java.net.*;
import java.io.*;
public class testVisit {
   public static void main(String[] args) {
      try {
         URL url = new URL(args[0]);
         URLConnection connection = url.openConnection();
         connection.setRequestProperty("Referer", args[0]);
         connection.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0");
         BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
         String Line;
         while ((Line = in.readLine()) != null) System.out.println(Line);
         in.close();
      } catch (Throwable e) {e.printStackTrace();}
};o)
V.V.

Similar Messages

  • Why does my computer say its connected through wi-fi but wont open a web page, why does my computer say its connected through wi-fi but wont open a web page but will work if im hardwired into the internet

    my computer is showing full connection through the airport but wont open any web pages it says it is not connected to the internet... When i hard wire the internet in with the cord it works just fine so i think i somehow messed up or turned of my wi fi capability but i show my airport is on

    Your computer is showing it's connected to the Wifi router all right, but perhaps the router isn't connected to the Internet.
    If your connecting the Ethernet cable directly to the modem and resetting it, bypassing th erouter and then getting online, fine that's good.
    If your connecting to the router directly and getting on the Internet fine, it means the router is connected to the Internet.
    If the last one is true then likely what has occured is your DCHP lease is expired because your computer doesn't have the right time and date as the router, it's showing a good signal but your not connecting.
    Open System Preference and check the date and time and set it to update to Apple's time server for your location.
    Sometimes Apple's time is off, as third party routers get their time elsewhere and sometimes the two don't match and thus DCHP lease is expired.
    ..WiFi, Internet problems, possible solutions

  • Opening a web page in a new tab appear web page from the history

    When I like to open a web page in a new tab, is opening a BLANK page and in the new tab's address bar appear a random web page address from history .

    Try performing a clean reinstall.
    Please follow these steps:
    '''Note:''' You might want to print these steps or view them in another browser.
    #Download the latest Desktop version of Firefox from http://www.mozilla.org and save the setup file to your computer.
    #After the download finishes, close all Firefox windows (click Exit from the Firefox or File menu).
    #Delete the Firefox installation folder, which is located in one of these locations, by default:
    #*'''Windows:'''
    #**C:\Program Files\Mozilla Firefox
    #**C:\Program Files (x86)\Mozilla Firefox
    #*'''Mac:''' Delete Firefox from the Applications folder.
    #*'''Linux:''' If you installed Firefox with the distro-based package manager, you should use the same way to uninstall it - see [[Installing Firefox on Linux]]. If you downloaded and installed the binary package from the [http://www.mozilla.org/firefox#desktop Firefox download page], simply remove the folder ''firefox'' in your home directory.
    #Now, go ahead and reinstall Firefox:
    ##Double-click the downloaded installation file and go through the steps of the installation wizard.
    ##Once the wizard is finished, choose to directly open Firefox after clicking the Finish button.
    Please report back to see if this helped you!
    Thanks,
    cyborg4

  • I updated to os x 10.8.5 today and now I cannot publish changes to my web page through iweb.  iweb crashes every time I try to publish

    I updated to os x 10.8.5 today and now I cannot publish changes to my web page through iweb.  iweb crashes every time I try to publish

    First do the following:
    1 - delete the iWeb preference file, com.apple.iWeb.plist, that resides in your
         User/Home/Library/ Preferences folder.
    2 - delete iWeb's cache file, Cache.db, that is located in your
    User/Home/Library/Caches/com.apple.iWeb folder (Snow Leopard and Earlier).
    NOTE:  In Lion and Mountain Lion the Library folder is now invisible. To make it permanently visible enter the following in the Terminal application window: chflags nohidden ~/Library and hit the Enter button - 10.7: Un-hide the User Library folder.
    Next, in Lion and Mountain Lion the Home/Library folder is now invisible. To make it permanently visible enter the following in the Terminal application window: chflags nohidden ~/Library and press the Return key - 10.7: Un-hide the User Library folder.
    To open your domain file in Lion or Mountain Lion or to switch between multiple domain files Cyclosaurus has provided us with the following script that you can make into an Applescript application with Script Editor. Open Script Editor, copy and paste the script below into Script Editor's window and save as an application.
    do shell script "/usr/bin/defaults write com.apple.iWeb iWebDefaultsDocumentPath -boolean no"delay 1
    tell application "iWeb" to activate
    You can download an already compiled version with this link: iWeb Switch Domain.
    Just launch the application, find and select the domain file in your Home/Library/Application Support/iWeb folder that you want to open and it will open with iWeb. It modifies the iWeb preference file each time it's launched so one can switch between domain files.
    WARNING: iWeb Switch Domain will overwrite an existing Domain.sites2 file if you select to create a new domain in the same folder.  So rename your domain files once they've been created to something other than the default name.
    OT

  • Can not open any web page in Safari

    can not open any web page in Safari on the IPad.  All other wireless features work fine.

    If this does not work then try a reset ,
    Reset your iPad by pressing the 'Sleep' and 'Home' button at the same time for about 15 seconds or so. Your iPad  will then go through a reset / reboot procedure and will be ready for use within about a minute.
    Don't worry about doing this as you will not lose data or settings.
    Good luck and do report back.

  • How do i send the username and password to yahoo web page through url

    how do i send the username and password to yahoo web page through url i.e as Query string so that my account in yahoo will open...

    If you don't mind using a library, then download and use the Apache HttpClient library. It takes care of all these details for you.

  • Can't open some web pages... DOES ANYONE HAVE A FIX THAT WORKS?

    I'm unable to open certain web pages. The pages will start to open and than the application will just stall. This seems to have coincided with downloading a security update a while back. I've tried downloading firefox and it too will not open these specific pages. I've searched the forum and as of now I can't find a solution. From what I've hear, Apple isn't even acknowledging that there is an issue. I've repaired permissions, deleted Safari plist files, all with no improvement. I know for a fact that it is not my internet connection, as my powerbook can navigate to these sites without any issues, however my powermac seems to have "forgotten" how to open some web pages.
    Any fixes would be enourmously appreciated!

    Thanks for the reply.
    I don't think that reporting the pages to apple would do much good as it's not the pages themselves that are the issue, it's something on my system that prevents them from opening up properly. My laptop will open the pages without any issue, however my desktop isn't able to for god knows what reason. I know others on this board have had similar problems.

  • When I try to open a website, a dialog bok opens heading "Opening Serch". I t asks 'What should Firefox do with this file?' instead of opening that web page.

    When I try to open any web page, a dialog box opens up "Opening search". It asks me 'What should Firefox do with this file?'
    The bullets 'Open with Browse' and Sane File.

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Tools > Options > Privacy > Cookies: "Show Cookies"
    Which security software (firewall, anti-virus) do you have?
    Some security may alter the HTTP response headers if Firefox is not a trusted application.

  • How do i Hyperlink to a web page from a java application?

    How do i Hyperlink to a web page from a java application using internet explorer as my default web browser?

    It's very simple.You can start any Application with the class Runtime. The command is an array consisting of the path of .exe and the file to be open.
    String [] cmd={path of IE+Filename.exe,"URL of your website"}
    try
    Runtime.getRuntime().exec(cmd);
    catch (Exception e)
    System.err.println(e.toString());
    }

  • Haveing problems with Safari. It gives me an error message. Safari can't open the web page, because it can't establish a secure connection to the server. It only seams to have a problem on https sites. Any help would be apreciated.

    Safari keeps giving  and error message. " Safari can't open the web page( insert web page here) , because it can't establish a secure connetion to the server.
    It only seams to have a problem with https sites.
    Any help would be appreciated

    The "s" in "https" indicates the site is a secure server--usually a site that will require a password.  Connections to secure servers can be blocked by parental controls.  Are you using any parental controls, either through OSX's settings (in System Preferences) or third party parental control software (such as Netnanny)?  If so, check the settings to make sure they will allow the connection.

  • Opening a web page from oracle

    Hi ,
    How can i open a web page example : "www.yahoo.com" from pl/sql ?
    One more thing , if this was possible is there a way to provide the username/password to the website to be logged on right when the page is browsed ?
    also how does Oracle know of the browser that is going to be used ?
    Thanks...

    CREATE OR REPLACE PROCEDURE show_url
        url      IN VARCHAR2,
        username IN VARCHAR2 DEFAULT NULL,
        password IN VARCHAR2 DEFAULT NULL
    ) AS
        req       utl_http.req;
        resp      utl_http.resp;
        name      VARCHAR2(256);
        value     VARCHAR2(1024);
        data      VARCHAR2(255);
        my_scheme VARCHAR2(256);
        my_realm  VARCHAR2(256);
        my_proxy  BOOLEAN;
    BEGIN
    -- When going through a firewall, pass requests through this host.
    -- Specify sites inside the firewall that don't need the proxy host.
      utl_http.set_proxy('proxy.my-company.com', 'corp.my-company.com');
    -- Ask UTL_HTTP not to raise an exception for 4xx and 5xx status codes,
    -- rather than just returning the text of the error page.
      utl_http.set_response_error_check(FALSE);
    -- Begin retrieving this Web page.
      req := utl_http.begin_request(url);
    -- Identify ourselves. Some sites serve special pages for particular browsers.
      utl_http.set_header(req, 'User-Agent', 'Mozilla/4.0');
    -- Specify a user ID and password for pages that require them.
      IF (username IS NOT NULL) THEN
        utl_http.set_authentication(req, username, password);
      END IF;
      BEGIN
    -- Start receiving the HTML text.
        resp := utl_http.get_response(req);
    -- Show the status codes and reason phrase of the response.
        dbms_output.put_line('HTTP response status code: ' || resp.status_code);
        dbms_output.put_line('HTTP response reason phrase: ' || resp.reason_phrase);
    -- Look for client-side error and report it.
        IF (resp.status_code >= 400) AND (resp.status_code <= 499) THEN
    -- Detect whether the page is password protected, and we didn't supply
    -- the right authorization.
          IF (resp.status_code = utl_http.HTTP_UNAUTHORIZED) THEN
            utl_http.get_authentication(resp, my_scheme, my_realm, my_proxy);
            IF (my_proxy) THEN
              dbms_output.put_line('Web proxy server is protected.');
              dbms_output.put('Please supply the required ' || my_scheme ||
                ' authentication username/password for realm ' || my_realm ||
                ' for the proxy server.');
            ELSE
              dbms_output.put_line('Web page ' || url || ' is protected.');
              dbms_output.put('Please supplied the required ' || my_scheme ||
                ' authentication username/password for realm ' || my_realm ||
                ' for the Web page.');
            END IF;
          ELSE
            dbms_output.put_line('Check the URL.');
          END IF;
          utl_http.end_response(resp);
          RETURN;
    -- Look for server-side error and report it.
        ELSIF (resp.status_code >= 500) AND (resp.status_code <= 599) THEN
          dbms_output.put_line('Check if the Web site is up.');
          utl_http.end_response(resp);
          RETURN;
        END IF;
    -- The HTTP header lines contain information about cookies, character sets,
    -- and other data that client and server can use to customize each session.
        FOR i IN 1..utl_http.get_header_count(resp) LOOP
          utl_http.get_header(resp, i, name, value);
          dbms_output.put_line(name || ': ' || value);
        END LOOP;
    -- Keep reading lines until no more are left and an exception is raised.
        LOOP
          utl_http.read_line(resp, value);
          dbms_output.put_line(value);
        END LOOP;
      EXCEPTION
        WHEN utl_http.end_of_body THEN
        utl_http.end_response(resp);
      END;
    END;
    SET serveroutput ON
    -- The following URLs illustrate the use of this procedure,
    -- but these pages do not actually exist. To test, substitute
    -- URLs from your own Web server.
    exec show_url('http://www.oracle.com/no-such-page.html')
    exec show_url('http://www.oracle.com/protected-page.html')
    exec show_url('http://www.oracle.com/protected-page.html', 'scott', 'tiger')Reference
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_web.htm#BGBGBFJJ
    !http://download.oracle.com/docs/cd/B19306_01/dcommon/gifs/oracle.gif!

  • Why Safari 4.0.4 cannot open some web pages?

    Safari 4.0.4 cannot open some web pages, while Firefox 3.5.7 works like a charm.
    I tried to open http://www.bdnews24.com/bangla/ for which Safari gets stuck (never opens the page, except for the first word of the first line), but Firefox shows the page very well. The same problem happens for some other web sites as well (e.g. http://www.prothom-alo.com/).
    (I have Ekushey Bengali AAT fonts, and they are working fine in Firefox and other applications. So this cannot be a font issue.)

    HI,
    From the Safari Menu Bar, click Safari / Empty Cache. When you are done with that...
    From the Safari Menu Bar, click Safari / Reset Safari. Select the top 5 buttons and click Reset.
    Go here for trouble shooting 3rd party plugins or input managers which might be causing the problem.
    http://support.apple.com/kb/TS1594
    Make sure you are running Safari in 32-bit mode. Right or control click the Safari icon in the Applications folder, then click: Get Info In the Get Info window click the black disclosure triangle next to General so it faces down. Select 32 bit mode. Also, (in that same window) make sure Safari is NOT running in Rosetta.
    In case it could be a font issue in the future this may help.
    Try clearing the font cache. In order to do that you need to boot in Safe Mode.
    Shut down your Mac.
    Press the power button.
    Immediately after you hear the startup tone, press and hold the Shift key.
    Release the Shift key when you see the gray Apple and progress indicator. During startup in Mac OS X v10.4.x or later, you will see "Safe Boot" on the login window, even if normally you log in automatically. Boot time is a minute or two longer than a normal boot.
    After your Mac boots to the Desktop restart the computer normally, without holding any keys during startup.
    What this process does... It moves to the Trash all font caches normally stored in /Library/Caches/
    Restart your Mac and try Safari.
    Carolyn

  • Open a web page

    Hi all,
    I am distributing a web based application using JNLP technology
    There are few buttons that must open a web page in the web browser
    So I have to start the web browser and direct it to my web page
    How can I do this?
    Thank You
    Sameera

    Hi,
    You can use the BasicService.showDocument() from the JNLP application...
    Check out the documentation
    http://java.sun.com/j2se/1.5.0/docs/guide/javaws/jnlp/javax/jnlp/BasicService.html#showDocument(java.net.URL)
    Otherwise you can use the Desktop API http://download.java.net/jdk6/docs/api/java/awt/Desktop.html
    HTH,
    Cheran

  • Open a web page with plsql

    Hi,
    I want to open a web page with plsql. I have tried this with utl_http.request but I have some errors like time out or site is not reacheable.
    In fact, I search to personalize a form (11.5.10) with a new menu which call a plsql procedure. And this last must open a web page.
    Any idea ?
    regards,

    The PL/SQL code should run from the server and not from the forms. Anonymous PL/SQL code written within forms application does not run from the server. The solution is to create a Server side stored procedure and call it from forms.

  • Open cached web page?

    How can I open cached web pages?
    I know these are cryptically stored somewhere under Library/Caches/Safari, but is there a way to actually open these as web pages?

    Try using:
    tell application "Finder"
    set theURL to "yourURL"
    repeat with this_file in (get every file of entire contents of folder "Library:Caches:Safari:" of home)
    try
    set the_string to (read (this_file as alias) from 1 to 1000)
    on error
    set the_string to ""
    end try
    if the_string contains theURL then
    reveal this_file
    return --script stops right here if line reached
    end if
    end repeat
    display dialog "No cache file exists for that address." buttons "OK" default button "OK"
    end tell
    (19094)

Maybe you are looking for

  • Error while launching WebClient from GUI in CRM 2007

    When I try to launch WebClient application from workbench, I see the following information: Error while loading the runtime repository via HTTP. When I proceed to log on in the web browser, it throws an error: The URL http://.......com....was not cal

  • Post  R/3 plug-in problem

    Hi, Our BW system is currenlty on 2.1C and R/3 on 46C. We recently upgraded our Plug-in in R/3 from 2002_1_46C to 2004_1_46C but facing some problems. - The datasources 0ACCOUNT_TEXT , 0CO_AREA and 0COSTELMNT_TEXT are not extracting any data. It is s

  • How to deal with SOAP attachments?

    Is there any information available on how to work with SOAP attachments? I am looking for a feature similar to what is available in other products where you can take a byte[] and map to image/jpg, application/octet-stream, etc... and have the tool cr

  • Declaration in plsql

    hi I am trying to compile this code but its not comipiling here is the code <pre> declare      type null_record is record(           fname varchar2(10) default 'PLSQL',           lname varchar2(10) default 'Oracle'); procedure by_refrence(in_r in nul

  • How to generate Business Partner only in SAP for Naksia

    Hi Everyone, Having one issue, if you can help me out In SAP when we run HRSYNC_PERSON report automatically it will generate Central Person and Business Partner. Here my question is what options to select in this report to generate Central Person & B