Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Downloading web page with java script enabled through Java

  1. #1
    Junior Member
    Join Date
    Nov 2010
    Thanked 0 Times in 0 Posts

    Default Downloading web page with java script enabled through Java

    Hi guys,

    I'm trying to download a 'JS enabled' web page through Java. But when I do, it just seems to download a page that just says "Please enable JavaScript". Is there a way to enable JS within Java? What should I use?


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Thanked 833 Times in 772 Posts
    Blog Entries

    Default Re: Downloading web page with java script enabled through Java

    Never encountered this issue before, but you could try setting the user agent to something and see if that helps.
    conn.setRequestProperty("User-Agent", "Mozilla 5.0");//where conn is a URLConnection
    The above is an abbreviated way to set the user agent...search the web and you will find more specific details on the appropriate value for the the agent. May not work, but its worth a shot. May be another request property you can set that might do the trick
    Last edited by copeg; November 13th, 2010 at 09:30 PM.

Similar Threads

  1. Java layer over a page?
    By millhugz in forum Java Theory & Questions
    Replies: 7
    Last Post: July 1st, 2010, 01:23 PM
  2. Java problem -- sending email via JSP page
    By java_beginner in forum Java Theory & Questions
    Replies: 2
    Last Post: June 28th, 2010, 02:35 AM
  3. control third party page in java.
    By kirti in forum Member Introductions
    Replies: 1
    Last Post: May 2nd, 2010, 03:33 PM
  4. Related to Html and Java Script?
    By JackyRock in forum JavaServer Pages: JSP & JSTL
    Replies: 2
    Last Post: February 17th, 2010, 03:10 AM
  5. Trouble in downloading java
    By captjade in forum Java Theory & Questions
    Replies: 6
    Last Post: March 3rd, 2009, 04:16 PM