Results 1 to 2 of 2
  1. #1
    wwuster is offline Member
    Join Date
    Oct 2008
    Rep Power

    Default System.setProperty("http.agent"..) appends Java/1.6

    In my JAVA program I set the user agent with
    System.setProperty("http.agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)");

    But I see from packet sniffing that JAVA appends " Java/1.6" to the user agent that I'm trying to set.

    This causes a web page that I am trying to read to stop responding.

    Does anyone know how to get around this?


  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Colombo, Sri Lanka
    Blog Entries
    Rep Power


    Check the "http.agent" value before set the property. May be somewhere within your application it can be appended, system cannot append that as far as I know.

Similar Threads

  1. Replies: 1
    Last Post: 10-20-2008, 07:35 AM
  2. <core:forEach var="" begin="+<%=j%>+">???
    By freddieMaize in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 09-27-2008, 01:20 AM
  3. System.out.print("Hello!")
    By Console in forum Introductions
    Replies: 6
    Last Post: 09-22-2008, 12:09 AM
  4. Replies: 11
    Last Post: 08-19-2008, 11:29 AM
  5. "Jumble" or "Scramble" Program
    By Shadow22202 in forum Java Applets
    Replies: 8
    Last Post: 04-30-2008, 03:42 AM

Posting Permissions

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