Results 1 to 2 of 2
  1. #1
    nPwn is offline Member
    Join Date
    Feb 2012
    Posts
    2
    Rep Power
    0

    Default How to refresh a page using java?

    I have figured out how to start a page:
    Java Code:
     public static void displayURL(String url, int buyingprice)
        {
            boolean windows = isWindowsPlatform();
            String cmd = null;
            try
            {
                if (windows)
                {
                    
                  cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
                    Process p = Runtime.getRuntime().exec(cmd);
                    
                }
            }
            catch(IOException x)
           {
            
               System.err.println("Could not invoke browser, command=" + cmd);
               System.err.println("Caught: " + x);
           }
    }
    
      public static boolean isWindowsPlatform()
        {
            String os = System.getProperty("os.name");
            if ( os != null && os.startsWith(WIN_ID))
                return true;
            else
                return false;
        }
    But how can I now refresh that page?

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default Re: How to refresh a page using java?

    Where is the page being displayed?
    Is there an API that you can call to ask the page displayer to refresh the page?

    It looks like the page being displayed by another independent application.
    The Robot class would be able to move the cursor and press it anywhere on the screen.

Similar Threads

  1. Auto Refresh a Java Popup Page?
    By lokerd in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 06-07-2011, 06:46 PM
  2. Web page refresh
    By Araganaus in forum New To Java
    Replies: 1
    Last Post: 09-03-2009, 08:06 PM
  3. warning that page has expired and i need to refresh the page again
    By 82rathi.angara in forum JavaServer Pages (JSP) and JSTL
    Replies: 5
    Last Post: 07-15-2008, 01:48 PM
  4. Refresh the page
    By udhayageetha in forum AWT / Swing
    Replies: 2
    Last Post: 07-01-2008, 09:03 AM
  5. How to Refresh the same page by JSP
    By AbuAziz in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 12-10-2007, 04:06 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •