Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Develop a user defined plugin for web browser

 
Neeraj jain
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to develop a user defined plugin for a web browser. It should features:

  • It should be installed in any browsers.
  • It should be executed whenever the browser starts.
  • It should call any Java functionality like execute the Java Program , fetch the output of that Program and returns that Output


  • How to start with it? It would be helpful if there is some sample. Thanks in advance
     
    Ulf Dittmer
    Rancher
    Posts: 42969
    73
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    What would this plugin do that an applet (utilizing the existing Java browser plugin) couldn't do? What is the fundamental use case?
     
    Neeraj jain
    Ranch Hand
    Posts: 108
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    @Ulf
    I actually want to read the client's Machine MAC Address , i tried it with this code



    but with this above code I am getting null into the NetworkInterface so not able to read the Mac Addres then I tried it with this below Program ,



    Now Problem with this above code is that it works fine onto a local System and giving all Information but when i access it as an WebApp so it is giving on the Enumeration

    of only Server's(where my application is deployed) Network Interfaces not the client's Machine , So I thought of to create a plugin and install into client's machine then get the

    MAC Address, So kindly do help me with it ,

    and Please don't give an alternative of MAC Address , it's a non negotiable Requirement
     
    Ulf Dittmer
    Rancher
    Posts: 42969
    73
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    So the idea with the static IP address didn't work out?

    I'll be honest and state up front that I give this idea of a browser plugin zero chance of success. Plugins are different for each browser, so you'd need multiple versions. And it's not clear that those plugins will be able to get the MAC address, either. But didn't you say that this was about just one user? So do you really need to target multiple browsers?

    I have two suggestions for solutions that I think are much more realistic than writing a browser plugin.1) Java applets - a signed Java applet can ship with and run native code via JNI, so you have access to the MAC. Plus, just about everybody already has Java installed, although it may be turned off. But since there is a customer relationship, that may not be an obstacle. 2) If it's really just one user, install a client certificate on his machine. Or buy a biometric device and put it on his desk. Both approaches would be much faster to implement (and likely cheaper) than creating your own solution.

    And my final advice is (and this goes way beyond the problem at hand): security is hard. Trying to roll your own is more likely to result in an insecure system than in a secure one. Use proven building blocks, put them together, and keep the amount of code and complexity you add to it to a minimum. If that means a system that is somewhat different than the original requirements, that may be an acceptable price to pay.
     
    Neeraj jain
    Ranch Hand
    Posts: 108
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    @Ulf Thanks Man but could you please tell me how to make a Signed Applet because i just implemented the above thing with Normal Applet and it is not having the access to the MAC Address............. so could you guide me the way how to make an Applet Signed and use it in my WEBApplication to fullfill my requirements
    and yes the IDEAS of static IP did'nt worked because it cost my company a lot in terms of Money and the business Team didn't want to spend so much cost .
     
    Ulf Dittmer
    Rancher
    Posts: 42969
    73
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Searching for "develop java applet containing JNI native code" found http://www.raditha.com/java/jni/ and http://www.javaworld.com/article/2076775/java-security/escape-the-sandbox--access-native-methods-from-an-applet.html. There are likely more articles if you use this or similar search phrases.
     
    Neeraj jain
    Ranch Hand
    Posts: 108
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    @Ulf
    Finally I successfully created a selfsigned applet that is providing me the satisfactory results,
    but now i am facing some problems :

    1) My login webpage at which this applet runs loads very slowly.
    2) User has to manually install the JAVA plugin there is no direct installer into the browser like other plugins which make it sometime annoying to users

    3) for this I know the solution but still asking that Can't i save my money by SelfSigning the applet jar file instead of getting it signed by Certificate Authorities(like verign and all) .... but if i use Selfsigned i have to manually add the sites url into the exception list of Java ControllPannel so any suggestion for this 3rd problem
     
    Ulf Dittmer
    Rancher
    Posts: 42969
    73
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    #1: Does the web page load slowly, or does the applet take time to load? The former wouldn't make sense, but the latter is to be expected.

    I think using the Java Deployment Toolkit addresses #2.

    As to #3, there is no way around that.
     
    Neeraj jain
    Ranch Hand
    Posts: 108
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    @Ulf ,
    Applet taking time to load , and many times my webbrowser shows not responding this didn't happened previouslly but after the Applet implementation it started , which makes the user experience worsen so any alternative suggestion for that.

    and for the 2nd one Java Deployement toolkit
    I included the below script



    into my Jsp page but still when i open my web application onto a MAC browser it still send me to that dowload plugin page , Please help me out if i am getting this point wrong
     
    Ulf Dittmer
    Rancher
    Posts: 42969
    73
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    when i open my web application onto a MAC browser it still send me to that dowload plugin page

    And does this Mac (not MAC) have Java installed for the browser? That's separate from installing the JDK.
     
    Neeraj jain
    Ranch Hand
    Posts: 108
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    @ULF that is Apple's MAC Book and into the chrome browser the support of java has been removed for MAC OS and for the linux so that is why having the problem and when i use this Java Deployement toolkit and use it into the linux OS chrome's browser it throws me to the download page of JDK
    then how Java Deployement toolkit suppose to help me out
     
    Ulf Dittmer
    Rancher
    Posts: 42969
    73
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Once again: the computers are called Mac - short for Macintosh. It's not an acronym, so "MAC" is plain wrong.

    Not following (what does Linux have to do with OS X?), but if support for Java has been removed from that machine, then it is natural that the deploy script should lead you to the download page, is it not?
     
    Neeraj jain
    Ranch Hand
    Posts: 108
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    @Ulf ,
    Hello Man, Finally My App is working perfectly the only problem my client are facing is this :
    If the Java is not installed in the client's machine then he/she will be redirected to the Java Download page where the user , downloads that java installer exe, but the problem is that after downloading the java client have to manually start the insaller to install java , Now my question is that is there a way that after downloading java , Installing starts automatically , i.e User does not have to go to the Downloads Folder and manually run the installer
     
    Ashish Kumar Singh
    Greenhorn
    Posts: 1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I want this code , Find Client MAC Address Based on IP Address Using Java Applet

    Hello Neeraj can you send me this code
     
    Neeraj jain
    Ranch Hand
    Posts: 108
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    #1: Does the web page load slowly, or does the applet take time to load? The former wouldn't make sense, but the latter is to be expected.


    Hii ULF,
    After adding applet in my jsp , My webpage is loading very slowly , causing the Google Chrome browser to show Web Page Not Responsive Dialog Box



    Please suggest something .
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic