Opening an Html page from java code

Hi
I have created an application and in order to complete it i need to configure help file with it. Now i have created a menubar in which help button is present.
My requirement is that clicking the help button should display the help file which is in the form of an html file in a new window just as in any other application.
Can anybody help me on this issue? Your help would ge really appreciated :)
Thanks

My requirement is that clicking the help button should display the help file which is in the form of an html file in a new window just as in any other application.Do you want to open a new "Browser"? is this a hard and fast requirement? If not why don't you use javahelp instead.
For more details refer : http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javahelp/index.html

Similar Messages

  • Opening a HTML page from a Navigation link

    Hi All,
           I have a requirement of adding a new link at the navigation bar of WebClient. This link will open a static html page with some contents. I have created the page required for it. But I don't know how the link will be created at Navigation bar and how to open the html page from it. I am using the SAP CRM 5.0 and I want to add the link at Default profile.
      Please help.
    Thanks
    Indranil Datta

    Hi Sujit,
        Thanks for your help. I have created a new navigation bar entity and added that in a customized profile. I have also mentioned the page name and path for that link from tran SPRO. I found that link after logging into IC WebClient. But that link is not connected with the required page. If I click on the link page, it get refreshed but without any change.
    Thanks,
    Indranil Datta.

  • Get parameters from html page from java application standalone ...

    Hi all,
    I work in one solution that i have values in Html Page and i want get the parameters values from html and cath they in java application standalone.
    The Html page is in same host than de java application.
    I want know if this is possible. I wnat know if without HttpServlet i can get the parameters from Html Page pure.
    Thanks in Advance for the ideas,
    Antonio.

    Hi Abdul,
    The problem is my client want one solution where i have one page simple page Html and one application java standalone. This application runs in one machine, but we don't have web server. So the question is: Is possible without web server i can get the parameters values that is inside the html page from java application. I remember you that the application java is one .jar that run's with one command line from crontab "java -jar teste.jar".

  • Show errors on UIX page from Java code?

    Hello all:
    I've got a simple Login page in Jdev 10g (9.0.5.2) that I'm setting up. The basics work fine -- if I type in a valid login/password, it works. If I type in an incorrect login/password, it loops back to the login page. The problem is that I can't seem to get my Invalid Login error message to appear.
    The loginPage.uix is based on a template. The template contains the following code:
    <messages>
    <messageBox automatic="true" />
    </messages>
    as a named child inside a <pageLayout> UIX node. The login page is:
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40"
    xmlns:pas="http://www.paslists.com/pas/templates"
    expressionLanguage="el">
    <templates xmlns="http://xmlns.oracle.com/uix/ui">
    <templateImport source="pasPageLayout.uit"/>
    </templates>
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui" >
    <contents>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title="PAS Login Page"/>
    </metaContainer>
    <contents>
    <body>
    <contents>
    <pas:pasPageLayout selectedGlobalHeader="3">
    <contents>
    <stackLayout>
    <contents>
    <spacer height="10"/>
    <styledText text="Please enter your Web ID and Password, then press the Log In button."/>
    <spacer height="10"/>
    <flowLayout>
    <contents>
    <styledText text="If you don't have an ID, please send an e-mail to our "/>
    <link destination="mailto:[email protected]" text="Web Administrator" />
    <styledText text=" requesting one."/>
    </contents>
    </flowLayout>
    <spacer height="10"/>
    <form name="loginForm" method="POST">
    <contents>
    <labeledFieldLayout labelWidth="25%" fieldWidth="80%" columns="2" width="80%" >
    <contents>
    <messageTextInput prompt="ID:" name="username" columns="20" />
    <messageTextInput prompt="Password:" name="password" secret="true" columns="20" />
    </contents>
    </labeledFieldLayout>
    <rowLayout hAlign="right">
    <contents>
    <submitButton text="Log In" formName="loginForm" event="goLogin"/>
    <spacer width="10" />
    <resetButton text="Reset" formName="loginForm" />
    <spacer width="10" />
    </contents>
    </rowLayout>
    </contents>
    </form>
    </contents>
    </stackLayout>
    </contents>
    <start>
    <flowLayout>
    <contents>
    <sideNav selectedIndex="0">
    <contents>
    <link destination="login.do" text="Logging In"/>
    <link destination="logoff.do" text="Log Off"/>
    </contents>
    </sideNav>
    </contents>
    </flowLayout>
    </start>
    </pas:pasPageLayout>
    </contents>
    </body>
    </contents>
    </document>
    </contents>
    </dataScope>
    </content>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    <event name="goLogin">
    <go name="login"/>
    </event>
    </handlers>
    </page>
    My Java code is:
    public class LoginAction extends DataAction
    public void findForward(DataActionContext actionContext) throws Exception
    HttpServletRequest request = actionContext.getHttpServletRequest();
    HttpSession session = request.getSession();
    ActionErrors errors = actionContext.getActionErrors();
    String target = "fail";
    //Get the result of the Model Method Call
    JUCtrlActionBinding method = actionContext.getCustomMethod();
    boolean successfulLogon = ((Boolean)method.getResult()).booleanValue();
    Integer attempts = (Integer)session.getAttribute("loginAttempts");
    int intAttempts = 0;
    if (attempts != null)
    intAttempts = attempts.intValue();
    if (!successfulLogon || intAttempts > 3)
    // If the Logon fails we need to do the follwoing
    // 1. Increment the counter. Once this exceeds 3 any logon will fail
    // 2. Create an error message to display on the logon screen.
    // Be sure that this is non-specific so crackers can't tell if
    // a portion if the username is correct or that there is a
    // Max attempts value.
    session.setAttribute("loginAttempts",new Integer(++intAttempts));
    errors.add("InvalidLogin",new ActionError("loginerr.invalid"));
    actionContext.setActionErrors(errors);
    else
    session.setAttribute("loginStatus", new String("true"));
    target = "success";
    actionContext.setActionForward(target);
    This goes to a "success" actionForward if the login works and a "fail" actionForward if the login fails.
    My ApplicationResources.properties file contains:
    loginerr.invalid=Invalid username/password. Please try again.
    This matches up with the key I used in the new ActionError() statement above.
    My structs-config.xml for this section looks like this:
    <action path="/mainAction" className="oracle.adf.controller.struts.actions.DataActionMapping" type="oracle.adf.controller.struts.actions.DataAction" name="DataForm">
    <set-property property="modelReference" value="loginUIModel"/>
    <forward name="success" path="/loginPage.do"/>
    <forward name="login" path="/loginAction.do"/>
    </action>
    <action name="DataForm" path="/loginAction" className="oracle.adf.controller.struts.actions.DataActionMapping" type="com.paslists.view.LoginAction">
    <set-property property="modelReference" value="loginUIModel"/>
    <set-property property="methodName" value="loginUIModel.login"/>
    <set-property property="resultLocation" value="${requestScope.methodResult}"/>
    <set-property property="numParams" value="2"/>
    <set-property property="paramNames[0]" value="${param.username}"/>
    <set-property property="paramNames[1]" value="${param.password}"/>
    <forward name="fail" path="/mainAction.do"/>
    <forward name="success" path="/getHomePageAction.do"/>
    </action>
    <action name="DataForm" path="/loginPage" forward="/loginPage.uix" validate="false"/>
    mainAction has a success forward to loginPage.uix. loginPage.uix has a "login" event attached to the submit button, which forwards to loginAction. loginAction executes the code declaratively and forwards to success or fail. If success, it continues on. If fail, it loops back to mainAction.
    Again -- this all works (almost). The only thing that does not work is that my ActionErrors() are not displaying on the web page.
    What am I doing wrong here?

    Solved my own problem. See the following thread for the answer:
    Displaying Struts messages/errors in 10g
    I modified my error code to be:
    actionContext.getActionErrors().add(ActionErrors.GLOBAL_ERROR,new ActionError("loginerr.invalid"));
    this.saveErrors(request,actionContext.getActionErrors());
    I modified my template to contain:
    <struts:dataScope xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui">
    <contents>
    <messageBox messageType="error" automatic="true"/>
    </contents>
    </struts:dataScope>
    I also added xmlns:struts="http://xmlns.oracle.com/uix/struts" to the templateDefinition.
    It now works.

  • To show a html page from java application

    hi everyone,
    I am trying to show a html page through java application. What i tried is Runtime.getRuntime().exec("start url"); this shows it opens default browser. It works fine for win Nt but does not work on win98 or linux.
    Is there any other way of achieving the same?
    can anyone help me in this regard. I am in urgent need of it. any reply will appreciate.

    I hope this works.
    String urlName = "http://forum.java.sun.com";
    String browser = "iexplore "; //EXE file name --> for iexplore.exe
    Runtime.getRuntime().exec(browser+urlName);

  • Open an *.html page from a vi

    Hi,
    I don't know how to open an .html file from a boolean bouton.
    someone could help me ?
    thanks

    tst wrote:
    But the HTML file on the RIO (if it's anything like remote front panels on the PC) is only a "pointer" to the VI. It is only used so that the browser will have a place to start. The PC has nothing actually running on it and the RIO is not displaying the web page.
    Here is the basic text from a sample file which tells the web browser to connect to a running VI.
    http://www.ni.com/webappdemos/lv">>
    You can see that it's only a few lines telling the browser to connect to the VI. I think that to use the link you will either need an LV program running on the computer or you will need to write your own browser for the RIO (not a recommended solution).
    Is all right, I know that the html file make only a connection to the VI, but the the web page file are on the cRIO.So I don't understand because you think that the browser must start from the cRIO. If I actually can visualize an html file, that is on the cRIO, and the browser are running on my pc, why a link from the VI (as www.html.it) must open a browser on the cRIO and not on client PC?

  • Open a html page from an applet

    Hi,
    I would like to open, from an applet, an HTML page in a new window with a specific width an eight.
    Who can help me ?

    Here is an example of applet to javascript with liveconnect:
    http://www.narhari.com/java/applet2javascript/
    You can use the send(String) method from the sample applet to send something like:
    window.open('xyz.html','myPopup','width=200,height=200');in order to open a window with specific dimensions
    of course you can also build HTML in your applet and use send() + some javascript to render it.

  • Execute html file from java code - urgent!!!

    Hi,
    I need help!!
    My application should open html file that located in my computer
    it should be open when some line in JList was choosen
    my question is: How can I open html file from my application
    I work with window XP
    I tried this one :
    Runtime.getRuntime().exec(cmdLine);
    but it doesn't work
    the exeption was: CreateProccess
    Please help! it's urgent!!!!

    http://forum.java.sun.com/thread.jsp?forum=31&thread=497600

  • Problem open new html page from flash

    Hello,
    in IE7 and IE8 block popup lock my external link(page html)
    I use GetUrl(url,"_blank") but not it works
    Why?
    i use flash cs4
    With firefox it work

    thank you for response,
    i have used correct command but not it works.
    It Works, in my popup setting are setting "CUSTOM" not MEDIUM
    thank you

  • Opening ADF page from java script

    I am trying to use window.open(url, winName) to open an ADF page from java script.
    I have set the same winName but when i call the window.open method every time it opens up a new window.
    The code is as below:
    <html>
    <head>
    </head>
    <body>
    <script>
    function openwin() {
    window.open("about:blank", "winDocPrint", "width=800,height=600,location=no");
    </script>
    <form action="http://127.0.0.1:7101/RegionRefresh-ViewController-context-root/faces/EnterAndDisplay?_afrLoop=3611588465186&_afrWindowMode=0&_adf.ctrl-state=zoaas2mc3_4" target="winDocPrint" onsubmit="openwin">
    <input type="submit" value="Print Comments Call ADF">
    </form>
    </body>
    </html>
    when I click the button first time, it opens a new window, and keeps opening a new windows on clicking the button again.
    I want it to use the same window that was opened first time.
    Any help would be appreciated.
    Thanks,
    Sandeep M.
    Edited by: user8895611 on Mar 25, 2010 11:44 PM

    Hi,
    you need to keep the window handle reference so you can access the same window
    http://www.irt.org/script/874.htm
    Frank

  • 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

  • Open HTML page from the stage

    How can I open a HTML page by pressing a button on the stage?
    I've created a rollover button and I'm trying to make it open
    an existing html page from the local disk (not an internet URL).
    But I can't make it open with Lingo or behaviour.
    Please help.
    Thanks a lot.
    Gideon.

    goToNetPage "
    http://somewhere.html" is the
    typical form for a page on
    the web, director must use the address format the system's
    browser uses
    for local files, this is somewhat platform dependant, a
    practical
    aproach is to open the file in question from within your
    browser then
    copy and paste the displayed address into your lingo code.
    Some report the goToNetPage counterpart provided by the
    buddyAPI xtra
    works more reliably, the xtra can be used for free if limited
    to a
    couple of functions.
    An alternate approach buddyAPI can use is to have the browser
    directly
    access the html file as if it were double clicked in the file
    manager
    using the same form commonly used to open PDF files with
    acrobat.
    (sorry I don't have example code handy)

  • How to populate a table in the html page from the java script

    Hi all,
    I have doubt in populating a table in the html page. my application is as follows
    I have a html page in which i have a combo box and a table following the combo box.
    i have to populate the table depending on the item selected in the combo box.
    for this i am using javascript to get the value of combo box onClick
    then i have to call some function thru jsp to get the data and then i have to populate the table with thst into from java script
    how can i do this, i.e populating html table from java script
    Thanks in advance
    satya

    Hi Mihai,
    You can populate data in DO_INIT_CONTEXT method of ur impl class in your Z component.
    data:
    lv_struct_ref type ref to YOUR_STRUCTURE,
    lv_value_node type ref to cl_bsp_wd_value_node,
    lv_bo_coll type ref to if_bol_bo_col.
    Data: current type ref to if_bol_bo_property_access.
    data: dref type ref to data.
    data: lv_guid_h type crmt_object_guid.
    data: lt_attr type table of YOUR_STRUCTURE.
    data: ls_attr type YOUR_STRUCTURE.
    data: lr_entity type ref to cl_crm_bol_entity.
    create object lv_bo_coll type cl_crm_bol_bo_col.
    lt_attr is ur internal table.
    Loop at lt_attr into ls_attr.
      create data lv_struct_ref.
      create object lv_value_node
           exporting
                iv_data_ref = lv_struct_ref.
    call method lv_value_node->if_bol_bo_property_access~set_property
    exporting
    iv_attr_name = 'YOURFIELDNAME1'
    iv_value = ls_attr-firstname.
    call method lv_value_node->if_bol_bo_property_access~set_property
    exporting
    iv_attr_name = ' YOURFIELDNAME2'
    iv_value = ls_attr-lastname.
    lv_bo_coll->add( lv_value_node ).
    typed_context->YOURCONTEXTNODE->set_collection( lv_bo_coll ).
    endloop.
    Regards,
    Raghu

  • Opening a HTML page on clicking of button .

    i created a button under menuItem help , i want to open a HTML page in other window (that is save inside my project folder ) when i click that button.
    for this i created jeditorpane and passing the URL in to its constructor but i m getting exception when i m using URL like "D:/x/y.html" exception is protocol not find and in the case of "http://localhost/d:/x/y.html" exception is java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method
    my code is
    import javax.swing.JEditorPane;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JScrollPane;
    import javax.swing.SwingUtilities;
    import java.awt.Color;
    import java.awt.Container;
    import java.io.IOException;
    public class HelpDialog {
    * height of frame in pixels
    private static final int height = 1000;
    * width of frame in pixels
    private static final int width = 1000;
    private static final String TITLE_STRING = "Help";
    * URL of page we want to display
    private static final String URL = "http://localhost/D:/SVGcode/javaApplet/src/com/Documentation.html";
    // --------------------------- main() method ---------
         public HelpDialog()
         SwingUtilities.invokeLater( new Runnable()
         public void run()
         System.out.println( "Starting" );
         final JFrame jframe =
         new JFrame( TITLE_STRING );
         Container contentPane = jframe.getContentPane();
         jframe.setSize( width, height );
         contentPane.setBackground( Color.WHITE );
         contentPane.setForeground( Color.BLUE );
         jframe.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE);
         try
         System.out.println( "acquiring URL" );
         JEditorPane jep = new JEditorPane(URL);
         System.out.println( "URL acquired" );
         JScrollPane jsp =
         new JScrollPane( jep,
         JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
         JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED );
         contentPane.add( jsp );
         catch ( IOException e )
         System.err.println( "can't find URL" );
         e.printStackTrace();
         contentPane.add( new JLabel( "can't find URL" ) );
         jframe.validate();
         jframe.setVisible( true );
    plz help me

    Hi Sandy,
    Instead of giving url in the constructor. Paste the code below the JEditorPane. Remove the url from the JEditorPane constructor.
    try{
                        /** Files from system */
                        java.net.URL helpURL = new URL ("file:///" + "C:\\thread.jspa.htm");     
                        /** Files from inter net */
                         helpURL = new URL ("http://forums.sun.com/thread.jspa?threadID=5421146&tstart=0");
              if(helpURL!=null)     
               jHelp.setPage(helpURL);
              else
                   System.out.println("Couldnt find file");
               }catch(MalformedURLException exp){
                    System.out.println("Exception in page loading---"+exp);
               }catch(IOException ioexp){
                    System.out.println("Exception in page loading"+ioexp);
               }

  • How to create dom treeof html page with java

    hi, all
    i met with a problem how to create dom tree of html page wih jave, that is, given a html page, how to create a dom tree of this page with java?
    thanks in advance.
    regards
    richard

    but i m using this code to create node in html file
    HTMLLIElement li = (HTMLLIElement)appHTML.createElement("LI");
    Text txt = appHTML.createTextNode(name);
    li.appendChild(txt);
    appHTML.getElementById("name").appendChild(li);
    this will display all name value which is coming from database,
    and i want to assign a hyperlink to it,
    I have id with name also so I thought that using id i will
    create javascript like
    function popup(id)
         if(id==1)
              var n1 = window.open("../list/name1.html");
         if(id==2)
              var n1 = window.open("../list/name2.html");
    this way i want to popup particular file if i can pass id value in this function
    so want hyperlink like
    name

Maybe you are looking for

  • How do I print in draft mode on Epson Workforce 3540

    I just bought and set up an Epson Workforce all in one printer.  Everything is working fine, except that I can't get it to print in draft mode. I've tried a few different applications and all are the same.  When I go to print, I get a window that inc

  • Long Text into BI

    Hi Guys, I have to bring long text (7000 characters long) from table STXL into BI. I went through the discussions on the forum without much help. One option is to split the text into multiple infoobjects and joining them in analyzer. This option is n

  • Flex Gumbo - Library Path "Include all classes" includes ActionScript Files

    I've added an "Actionscript File", i.e. a File with no package/class that is included in an actionscript class. In FlexBuilder 3, since there was no option to include all classes, I could optionally choose actionscript files. So, Make Flashbuilder's

  • Built in Camera is not working

    when i start photo booth or any other program, the green led turns on, but there's no image on the screen, just go black with a white circle turning around i've tried the SMC restart but isnt working 21.5" iMac 10.8.2 OS just out of the box

  • How to check the Oracle Release?

    Hi, How to check the release version in Oracle AS ? And How to find what oracle AS release has happened in year (example 2005)? Best Regards