Rendering a web page in a java application?

is it possible to show a web page based on tags from a java application .
For example, in VB i believe there is a component that allows you to render html and view it as seen in a web browser
I believe i have seen this done before.
stev

use JEditorPane

Similar Messages

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

  • RE: Can I hit a web page in my Java application ??

    I want to hit some web page through Java application, how should I do? Can I call something like HTTP://.... in my Java application??
    TIA
    Xin

    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.

  • Create web page in webdynpro java

    i want to create a web page in webdynpro java like in .net, how can i make a web page i.e. different from a simple webdynpro java page.

    As ayyapparaj told, you can create J2EE application with NWDS. it is purely eclipse platform.
    Go for Web Module Project where you can have JSP and Servlets, create a Enterprise Application out of Web Module and deploy it.
    nikhil

  • Launch a default web browser from my java application

    Hello,
    I have been trying to launch my default web browser from my java application, but am unable do it. Right now, I am using ---- "Runtime.getRuntime().exec("cmd /c start <url>"); to launch my webbrowser. It launches the browser but displays the command prompt for a second or so, and then replaces my already existing page with the new url.
    Is there any way for me to launch the url in a completely new browser each and every time. And I don't want the command prompt to show up for a sec. Please help...!
    Thanks in advance.
    -BusyBusyBee

    If by any chance your application is an Applet, you can use this to open a new browser window:
    getAppletContext().showDocument(new URL(theUrl), "_blank");
    But, you probably would have specified if that were the case. Oh well. Hope it helps someone!
    -sheepy.

  • How many web.xml in a java application

    Hi,
    can anyone give tell the answer for this question "How many web.xml in a java application?"

    1Why ?Because the Web container refers to only one web.xml for one web application.
    I havent heard of an application having more than 1 web.xml
    How?It reads all the definitions of servlet mappings, filters, welcome-file etc from this file itself.
    Where?From the following folder ...
    /WEB-INF
    By the way ..... the way you questioned me was amuzing ... Why? How ?Where ? Its funny :D
    I actually wanted to reply as below ..
    Why ?Why not
    How?
    Wait lemme think ....ummm... What do you mean how??
    Where ?
    Inside the web ;-)
    -Rohit

  • Help about opening a PHP page from a Java application

    Hi,
    I would have some elements to open a PHP page from a little Java application I'm doing. I would like to know the classes I had to use, how to implement them, ...
    In fact, I dial into my application my login, my password, and when I click on by "Connect" button, I must show the PHP page corresponding ti my profile onto the database. Picking up information from the database is not a problem, I know how to use SQL Packages in Java. The problem is to open a new page (IE or Netscape) when clicking on the "Connect" button in my application.
    Thanks a lot for advice me.
    C�dric

    Hi
    This class is from JavaWorld Tip 66 and I've used it to open web pages and files in a browser.
    import java.io.IOException;
    import java.util.*;
    * A simple, static class to display a URL in the system browser.
    * Under Unix, the system browser is hard-coded to be 'netscape'.
    * Netscape must be in your PATH for this to work.  This has been
    * tested with the following platforms: AIX, HP-UX and Solaris.
    * Under Windows, this will bring up the default browser under windows,
    * usually either Netscape or Microsoft IE.  The default browser is
    * determined by the OS.  This has been tested under Windows 95/98/NT.
    * Examples:
    BrowserControl.displayURL("http://www.javaworld.com")
    BrowserControl.displayURL("file://c:\\docs\\index.html")
    BrowserContorl.displayURL("file:///user/joe/index.html");
    * Note - you must include the url type -- either "http://" or
    * "file://".
    public class BrowserControl
         * Display a file in the system browser.  If you want to display a
         * file, you must include the absolute path name.
         * @param url the file's url (the url must start with either "http://"
    or
         * "file://").
        public static void displayURL(String url) throws Exception
            boolean windows = isWindowsPlatform();
            String cmd = null;
            try
                if (windows)
                    // cmd = 'rundll32 url.dll,FileProtocolHandler http://...'
                    cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
                    Process p = Runtime.getRuntime().exec(cmd);
                else
                    // Under Unix, Netscape has to be running for the "-remote"
                    // command to work.  So, we try sending the command and
                    // check for an exit value.  If the exit command is 0,
                    // it worked, otherwise we need to start the browser.
                    // cmd = 'netscape -remote openURL(http://www.javaworld.com)'
                    cmd = UNIX_PATH + " " + UNIX_FLAG + "(" + url + ")";
                    Process p = Runtime.getRuntime().exec(cmd);
                    try
                        // wait for exit code -- if it's 0, command worked,
                        // otherwise we need to start the browser up.
                        int exitCode = p.waitFor();
                        if (exitCode != 0)
                            // Command failed, start up the browser
                            // cmd = 'netscape http://www.javaworld.com'
                            cmd = UNIX_PATH + " "  + url;
                            p = Runtime.getRuntime().exec(cmd);
                    catch(InterruptedException x)
                        System.err.println("Error bringing up browser, cmd='" +
                                           cmd + "'");
                        System.err.println("Caught: " + x);
                        throw x;
            catch(IOException x)
                // couldn't exec browser
                System.err.println("Could not invoke browser, command=" + cmd);
                System.err.println("Caught: " + x);
                throw x;
         * Try to determine whether this application is running under Windows
         * or some other platform by examing the "os.name" property.
         * @return true if this application is running under a Windows OS
        public static boolean isWindowsPlatform()
            String os = System.getProperty("os.name");
            if ( os != null && os.startsWith(WIN_ID))
                return true;
            else
                return false;
         * Simple example.
        public static void main(String[] args)
          try
    //        displayURL("file://c:\\Manual\\Amphibian Accounting Help Test 3.pdf");
    //        displayURL("http://www.pro7.co.za");
            Properties prop = System.getProperties();
    //        Enumeration enum = prop.propertyNames();
            Enumeration enum = prop.keys();
            while(enum.hasMoreElements())
              enum.nextElement();
          catch(Exception e)
        // Used to identify the windows platform.
        private static final String WIN_ID = "Windows";
        // The default system browser under windows.
        private static final String WIN_PATH = "rundll32";
        // The flag to display a url.
        private static final String WIN_FLAG = "url.dll,FileProtocolHandler";
        // The default browser under unix.
        private static final String UNIX_PATH = "netscape";
        // The flag to display a url.
        private static final String UNIX_FLAG = "-remote openURL";
    }If you find a better solution please let me know!
    Regards
    Michael Williams

  • HELP: SimplePass that apart from open web pages, can also run applications

    Operating System: Windows 7
    Good, to buy my laptop HP Pavilion m6, I came a version of SimplePass in which could add web pages, passwords and also run applications (such as games), but then I gave for updates thinking that a next version would contain improvements; but the version that was installed no longer gave the option of running applications.
    Since then and I tried to find the version I had in the beginning, but without results.
    If you know SimplePass versions running programs, or if you know a better version leave the download links, please put them in the answers.
    In advance we thank you comment.
    I used the google translator, sorry if you do not understand the text.

    Hi @Marco0o 
    Welcome to the HP Support Community. I see that you are looking for the original version of your HP SimplePass software. I will be happy to help you with that but I need to know your product number, please.
    Please click “Accept as Solution ” if you feel my post solved your issue.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Thank you,
    BHK6
    I work on behalf of HP

  • Calling a web service from a Java application

    Does anyone have sample code showing how to call a web service over from a Java application? I'm deploy to HP-UX and seeking out the most standard and reliable approach.
    Thank you in advance.

    Keith,
    Download JWSDP 1.2, look at the tutorial for JAXRPC, especially
    the client portion.

  • Consuming web services with a java application

    Hello,
    I want to consume an ABAP generated web service with a stand-alone Java application. I am very new to this topic and need some hints how this functionality could be achieved.
    How is the web service accessed by the Java application? What about security issues?
    Thank you in advance for your replies! They will be appreciated.
    Kindest regards

    Hi
    See this Help and Examples
    http://help.sap.com/saphelp_nw2004s/helpdata/en/e2/36a53dc1204c64e10000000a114084/frameset.htm
    Kind Regards
    Mukesh

  • Rendering/Editing web pages

    Hi
    I am writing a web page editor/render using JEditPane,but recently i have come across a few browsers in java which do not use the JEditpane,instead they have used there own architecture from scratch,although i don't think there is any problem with my approach but can anyone tell me if there is some HTML support related or other issues which i might have overlooked,any help will be great

    See:
    Mac Maintenance Quick Assist,
    Mac OS X speed FAQ,
    Speeding up Macs,
    Macintosh OS X Routine Maintenance
    Essential Mac Maintenance: Get set up,
    Essential Mac Maintenance: Rev up your routines,
    Maintaining OS X, and
    Myths of required versus not required maintenance for Mac OS X for information.

  • Do you know any web pages that has java problem-solving questions??

    hi i just wanna practice my problem solving skills.......
    buy i ve already solved all the questions that i have......................
    so i m looking for new questions,,,looking for new problems..
    do you know any web site that provides java
    questions for students.......?

    better than u
    hellbetter than whom you dickhead.
    stay away from forums.

  • 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.

  • Open URL in Web Browser from a Java Application

    Hi,
    I have an HTML document that I want to load in a browser window by clicking on a button in my java GUI application.
    Any suggestions?
    Thanks.

    You can use the Process class to start the web browser with the proper command line arguments (depends on the web browser though). Or on windows, you can have your program create a batch file with the code start url (where [url] is your url), and this will open the default web browser when run (again you must run it with a Process).

  • How can I launch a web browser from my Java application?

    I've reed about this at Question of the Week (http://developer.java.sun.com/developer/qow/archive/15/index.html). It doesn't work for me. I'm running win2000 and trying:
    try {
    Runtime.getRuntime().exec("start iexplore http://java.sun.com");
    } catch (Exception e) {
    System.out.println( e.getMessage() );
    I get:
    CreateProcess: start iexplore http://java.sun.com error=2
    What's wrong?

    This function will launch the default browser under Windows.
    public static void displayURL(String url) throws IOException   {
        String cmd = null;
        Process p;
        try  {
            String os = System.getProperty("os.name");     
            if (os != null && os.startsWith("Windows")) {
                if (os.startsWith("Windows 9") || os.startsWith("Windows Me"))  // Windows 9x/Me
                    cmd = "start " + url;
                else // Windows NT/2000/XP
                    cmd = "cmd /c start " + url;
                p = Runtime.getRuntime().exec(cmd);     
        catch(IOException x)        {
            // couldn't exec browser
            System.err.println("Could not invoke browser, command=" + cmd);

Maybe you are looking for

  • Problem with Audio on HP Envy 6-1130sw (C6F62EA)

    Hello everyone. I have a problem with audio on my ultrabook HP Envy 6. Sometimes when I try to play music there are no low tones and music plays really silent... And then when I restart PC problem dissapears and music plays fine... I thought there is

  • TextPANE's Y_AXIS preferredSpan not set, but textAREA's is ?

    I can do area = new JTextArea(); area.setText( "Some text" ); view = area.getUI().getRootView( area ); height = view.getPreferredSpan( View.Y_AXIS ) ;and height is set to 16.0. But if I do pane = new JTextPane(); pane.setText( "Some text" ); view = p

  • I have 2 displays running off the same video card.

    I have 2 monitors, 48" Plasma tvs. I'm running a Mac Pro. With a video card upgrade, we ran the video signal to 1 monitor. It ran fine. Then we bought a splitter and split the HDMI signal to run to 2 tvs. The Monitors began todisconnect and reconnect

  • Email stops downloading messages

    Every day my mail client stops downloading email. When it tries to open an email, the wait circle is there indefinitely. New mail is not pushed or fetched. I have Exchange isync in push mode and an IMAP account in fetch mode. I have to reboot the iph

  • Can't open Photoshop after installing Yosemite

    Hi all, Not sure if this in the right place? I've got a Macbook Pro and have recently just installed the Yosemite operating system. After installing it, I have tried to open Photoshop but it is not allowing me to do so. Photoshop tells me to install