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.


>> REGISTER NOW TO START POSTING


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

Results 1 to 14 of 14

Thread: Is there any way to control all browsers functionality using java program ?

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Posts
    11
    My Mood
    Sad
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Is there any way to control all browsers functionality using java program ?

    Hi all,
    My aim is , i want to customize/control all browsers functionality which are running on my system.

    " When a user submitted URL/request from browser that request is redirecting to my java application, it contains list of blocking website(URL's ex: www.xyz.com) .The redirecting URL is comparing
    with list of blocking website , if that redirected URL is in list the browser will show error message
    otherwise it give normal response back "


    Any one please suggest/help me regarding this....

    Please tell me any other possible ways
    Last edited by vijay_p; November 14th, 2011 at 10:01 PM.


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,462
    My Mood
    Hungover
    Thanks
    144
    Thanked 639 Times in 547 Posts

    Default Re: Is there any way to control all browsers functionality using java program ?

    The short answer to this is "no".
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Think of me.... Mr.777's Avatar
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    1,136
    My Mood
    Grumpy
    Thanks
    20
    Thanked 82 Times in 78 Posts
    Blog Entries
    1

    Default Re: Is there any way to control all browsers functionality using java program ?

    Quote Originally Posted by KevinWorkman View Post
    The short answer to this is "no".
    I will disagree Kevin. I respect your knowledge and experience but i guess we can do this.
    What OP wants is actually the functionality of all browsers in his/her own created application(i guess).
    His/Her description is, a user submits a request to any browser and browser will call his/her java application. So, the only issue is a call from browser to user application. I know browsers are not open source so you can't modify browser's code but is there any logs build by the browsers, where they keep history? I hope there will be, so by simply parsing the log file, one can accomplish this task.

    I want Kevin to respond here, as i want his answer too over this.

    Thanks

  4. #4
    Junior Member
    Join Date
    Nov 2011
    Posts
    11
    My Mood
    Sad
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Is there any way to control all browsers functionality using java program ?

    Can please tell me which language suitable for this.

  5. #5
    Think of me.... Mr.777's Avatar
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    1,136
    My Mood
    Grumpy
    Thanks
    20
    Thanked 82 Times in 78 Posts
    Blog Entries
    1

    Default Re: Is there any way to control all browsers functionality using java program ?

    Quote Originally Posted by vijay_p View Post
    Can please tell me which language suitable for this.
    Well, i didn't work over such functionality yet, but if i would have to write, i will always welcome java to write. I don't have the concepts for now, but i hope that for making efforts, one can find solutions to any problem.

  6. #6
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,462
    My Mood
    Hungover
    Thanks
    144
    Thanked 639 Times in 547 Posts

    Default Re: Is there any way to control all browsers functionality using java program ?

    Quote Originally Posted by Mr.777 View Post
    I will disagree Kevin. I respect your knowledge and experience but i guess we can do this.
    What OP wants is actually the functionality of all browsers in his/her own created application(i guess).
    His/Her description is, a user submits a request to any browser and browser will call his/her java application. So, the only issue is a call from browser to user application. I know browsers are not open source so you can't modify browser's code but is there any logs build by the browsers, where they keep history? I hope there will be, so by simply parsing the log file, one can accomplish this task.

    I want Kevin to respond here, as i want his answer too over this.

    Thanks
    You might be understanding the OP better than I am, but that's not how I took his requirements. It sounds like what he wants is a Java program that runs that intercepts browser requests and displays a message (and redirects/blocks the browser) when appropriate. That's probably not possible in Java, might be extremely hard in Java, and is probably definitely not a job for Java in either case.

    But even going your route, I'm not sure how he'd do that with Java. The description "a user submits a request to any browser and browser will call his/her java application" is not exactly trivial. Going through some log files miiiiight be a way to go, but I don't think it's what the OP wants- and I don't think it will work even if it is what he wants.

    Just my two cents though. Feel free to prove me wrong, as I'd be quite impressed/scared if somebody did this in pure Java.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  7. #7
    Forum VIP
    Join Date
    Oct 2010
    Posts
    275
    My Mood
    Cool
    Thanks
    32
    Thanked 54 Times in 47 Posts
    Blog Entries
    2

    Default Re: Is there any way to control all browsers functionality using java program ?

    Quote Originally Posted by KevinWorkman View Post
    You might be understanding the OP better than I am, but that's not how I took his requirements. It sounds like what he wants is a Java program that runs that intercepts browser requests and displays a message (and redirects/blocks the browser) when appropriate. That's probably not possible in Java, might be extremely hard in Java, and is probably definitely not a job for Java in either case.

    But even going your route, I'm not sure how he'd do that with Java. The description "a user submits a request to any browser and browser will call his/her java application" is not exactly trivial. Going through some log files miiiiight be a way to go, but I don't think it's what the OP wants- and I don't think it will work even if it is what he wants.

    Just my two cents though. Feel free to prove me wrong, as I'd be quite impressed/scared if somebody did this in pure Java.
    Definitely a dare. I'm going to start working on that this weekend.

  8. #8
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,462
    My Mood
    Hungover
    Thanks
    144
    Thanked 639 Times in 547 Posts

    Default Re: Is there any way to control all browsers functionality using java program ?

    Quote Originally Posted by Tjstretch View Post
    Definitely a dare. I'm going to start working on that this weekend.
    Good luck. Let us know how it goes!
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  9. #9
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    21,046
    Thanks
    52
    Thanked 2,280 Times in 2,251 Posts

    Default Re: Is there any way to control all browsers functionality using java program ?

    How about a proxy server. I wrote a simple one years ago and have used it many times with various browsers to filter what the browser does. It must be setup using each browser's options menu item.

    I used it when I was on a dial-up connection and didn't want the browser to try going online when I had the files locally. There are links in the API doc that go to the tutorial. when I was reading the local API docs and clicked on a tutorial link the server redirected to files on my computer.
    From my server's .ini file:

    #Define Redirects
    RedirectCnt=3
    Redirect1.site=http://java.sun.com/docs/books/tutorial
    Redirect1.local=[DOCS_HOME]\\Java\\JavaTutorial\\
    Redirect2.site=http://developer.netscape.com/docs/manuals/js/client/jsguide
    Redirect2.local=[DEV_HOME]\\Norms\\JavaScript\\GuideJS13\\
    Redirect3.site=http://java.sun.com/javase/6/
    Redirect3.local=E:\\Java\\Java-1_6_0\\
    Last edited by Norm; November 15th, 2011 at 01:14 PM.

  10. #10
    Junior Member
    Join Date
    Nov 2011
    Posts
    11
    My Mood
    Sad
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Is there any way to control all browsers functionality using java program ?

    Quote Originally Posted by Norm View Post
    How about a proxy server. I wrote a simple one years ago and have used it many times with various browsers to filter what the browser does. It must be setup using each browser's options menu item.

    I used it when I was on a dial-up connection and didn't want the browser to try going online when I had the files locally. There are links in the API doc that go to the tutorial. when I was reading the local API docs and clicked on a tutorial link the server redirected to files on my computer.
    From my server's .ini file:

    #Define Redirects
    RedirectCnt=3
    Redirect1.site=http://java.sun.com/docs/books/tutorial
    Redirect1.local=[DOCS_HOME]\\Java\\JavaTutorial\\
    Redirect2.site=http://developer.netscape.com/docs/manuals/js/client/jsguide
    Redirect2.local=[DEV_HOME]\\Norms\\JavaScript\\GuideJS13\\
    Redirect3.site=http://java.sun.com/javase/6/
    Redirect3.local=E:\\Java\\Java-1_6_0\\
    Thank you for replying
    While using proxy, we have to configure proxy configurations manually in browser settings.
    without using manual configuration is there any possibility for using proxy?

  11. #11
    Think of me.... Mr.777's Avatar
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    1,136
    My Mood
    Grumpy
    Thanks
    20
    Thanked 82 Times in 78 Posts
    Blog Entries
    1

    Default Re: Is there any way to control all browsers functionality using java program ?

    Quote Originally Posted by KevinWorkman View Post
    You might be understanding the OP better than I am, but that's not how I took his requirements. It sounds like what he wants is a Java program that runs that intercepts browser requests and displays a message (and redirects/blocks the browser) when appropriate. That's probably not possible in Java, might be extremely hard in Java, and is probably definitely not a job for Java in either case.

    But even going your route, I'm not sure how he'd do that with Java. The description "a user submits a request to any browser and browser will call his/her java application" is not exactly trivial. Going through some log files miiiiight be a way to go, but I don't think it's what the OP wants- and I don't think it will work even if it is what he wants.

    Just my two cents though. Feel free to prove me wrong, as I'd be quite impressed/scared if somebody did this in pure Java.
    It's not to prove your wrong but to discuss with the java legends, any possbility for trying this.
    Well, let me get finished with my on going project and for sure i will revert my eyes to implement this. I will not work to prove you wrong but to prove that thing wrong that it's not the java work to do this. What i hope is, Java can do anything, what you can think.

  12. #12
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,462
    My Mood
    Hungover
    Thanks
    144
    Thanked 639 Times in 547 Posts

    Default Re: Is there any way to control all browsers functionality using java program ?

    Quote Originally Posted by Mr.777 View Post
    It's not to prove your wrong but to discuss with the java legends, any possbility for trying this.
    Well, let me get finished with my on going project and for sure i will revert my eyes to implement this. I will not work to prove you wrong but to prove that thing wrong that it's not the java work to do this. What i hope is, Java can do anything, what you can think.
    Haha I'm okay with being proved wrong, it's one of the best ways to learn. But I really disagree with your hope that Java can do anything. Java, like any programming language, is a tool, and different tools are right for different jobs. Doing low level, platform specific stuff? Don't do it in Java. Because even if you can find a way to do it, it's almost definitely a hack. Java was built around some pretty awesome concepts, and those concepts prevent it from interfering too much with other programs or with the underlying operating system. That's a good thing.

    But to do what the OP wants, that's exactly what you're going to need to do. To really understand a programming language, you have to be able to admit what it can't do, and why it can't do it. Java can't do stuff like this because it's dangerous- do you really want a Jar to be able to control your web browser? Yikes, I sure don't.

    The proxy idea sounds like the most feasible solution, maybe coupled with a redirect to a page that displays the message. You might even use JSP or an applet, so you're technically still using Java in there. That's probably the way to go, but it's a far cry from what the OP originally had in mind- which is fine, because what the OP originally had in mind sounds terrifying.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  13. The Following User Says Thank You to KevinWorkman For This Useful Post:

    Norm (November 16th, 2011)

  14. #13
    Forum VIP
    Join Date
    Oct 2010
    Posts
    275
    My Mood
    Cool
    Thanks
    32
    Thanked 54 Times in 47 Posts
    Blog Entries
    2

    Default Re: Is there any way to control all browsers functionality using java program ?

    After doing some research, I think he wants the equivalent of parental controls on the PC, while there are programs to do this, they require overriding native computer methods; which I am certain you cannot do with java.The only way that this is possible would be installing another dll file into your computer, but it would undoubtedly lag your computer because for it to work in all browsers you would have to check every outgoing message.

    The proxy solution does seem best in my mind, but it would require work from the user. I think that parental controls is practically a virus. (And could easily become one)

  15. #14
    Junior Member
    Join Date
    Nov 2011
    Posts
    11
    My Mood
    Sad
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Is there any way to control all browsers functionality using java program ?

    Quote Originally Posted by Tjstretch View Post
    The proxy solution does seem best in my mind, but it would require work from the user. I think that parental controls is practically a virus. (And could easily become one)

    while using proxy , i think we have to configure proxy configurations manually in browser. In this case if we remove or change proxy settings on browser my application wont work.

    Any other way to configure proxy configuration using java program.

Similar Threads

  1. Need Help Adding Functionality to GUI!
    By Black Balloon in forum AWT / Java Swing
    Replies: 1
    Last Post: August 29th, 2011, 07:16 AM
  2. New to Java: Adding Functionality to my Buttons
    By Staticity in forum What's Wrong With My Code?
    Replies: 0
    Last Post: July 23rd, 2011, 04:19 PM
  3. URLs in browsers
    By subhvi in forum Java Networking
    Replies: 3
    Last Post: October 8th, 2010, 03:06 AM
  4. Applet using .mp3 control in java
    By ychopade in forum Java Applets
    Replies: 0
    Last Post: July 15th, 2010, 07:26 AM
  5. FAX Functionality in JAVA Application
    By animesh in forum Java Theory & Questions
    Replies: 0
    Last Post: February 11th, 2010, 06:39 AM

Tags for this Thread