Unsigned applet

Hi, I have a simple question... �Can an unsigned applet connect to the same IP where it was downloaded but to another port (says 3306)?
Regards,
Neuquino

most probably it couldn't. in order to socket connection established, u have to sign the applet otherwise it fails...

Similar Messages

  • Remembering username and password in an unsigned applet...

    Does anyone have any ideas how my unsigned applet could remember the username and password entered by a user?
    Previously, I was using a signed applet so could store the username and password in a persistent text file, but now I need to provide an unsigned applet solution - so does anyone have any suggestions for how my applet could remember and recall the username and password?
    Many thanks,
    James

    Take global variable and store pass and user name in it .
    or getParameter() and setParameter() u can set parameter define in html file as global . so multiple applet in same webpage can access this pass and user name

  • Signed and unsigned applet

    Hi all,
    I want to create an applet that is firstly loaded as a normal (i.e., unsigned) applet. The user can use several features of the applet without seeing a security warning dialog. But when the user uses a certain feature of an applet (such as saving the data to his computer), there will be a security warning dialog that asked the user to allow the (same) applet to access the local harddrive. If the user allows, the applet will be switch to signed mode without having to reload.
    In short, is there a way to switch between an unsigned applet to a sign applet without reloading the applet?
    Thank you,
    vaxim

    It is possible if and only if your using different applets. In the same applet there is no possibility of switching signed and unsigned. But I think you can do this by specifying the certificate name.

  • Unsigned applet: some machines can copy to clipboard, others can't

    My understanding of Java applet security says that an unsigned applet cannot copy-to or paste-from the system clipboard. However, on at least two systems at my office (but not mine) the user can highlight text in one of our applets, hit Ctrl-C and copy the text to the clipboard. All machines are current vintage, running MS XP and Java 1.4.2. I've checked the java.policy files and they are identical--there are no non-standard permissions in them.
    Now my boss is complaining that I told him this couldn't be done without going the signed applet route. Does anybody know what's going on?

    First of all if you're developing applets for your company (or another one) make sure they
    have the jre set up correctly.
    Any respectfull IT person within a company has IE security set up so why not the jre as
    wel?
    Using the default jre installation in your company? Are you allso using the default IE
    install or did you not agree with some settings there?
    Anyway here is how I think you should set up the jre for your companys people:
    I think a good configuration would be a keystore and policy on the company's
    Intranet to be used by everyone and if so needed a keystore and policy in the user home
    folder to be edited only by admins. Add the 2 keystores to the java.security and the
    admins can configure any special privileges to special applets (like IE security zones
    but more detailed).
    Add the following line to all codebases: "grant { " section in the java.policy/
    permission java.lang.RuntimePermission "usePolicy";
    Now the user does not have the option of "do you trust" for signed applets. I think this
    is a verry good idea because anyone with a jdk can sign their jar.     
    About someone beeing able to copy and the other one not, I guess you've given the
    user too much freedom in changing their settings (the msjvm settings in IE). The
    applet is probably not even run with the SUN jre because you are using the Applet tag.
    Now I am not even sure if hitting crl + c does anyting with an unsigned applet but I would guess that accessing the clipboard from code should not be possible.

  • Unsigned applet load failure via HTTPS

    Java Plug-in 1.5.0_06
    MSIE 6.0
    Unsigned applet loading via HTTPS failed.
    We used a relative URL in an APPLET tag :
    <APPLET CODEBASE="/TEST/" ARCHIVE="test.jar" CODE="nl.myorganisation.test">
    The plugin does not seem to reuse the browser SSL-session.
    It looks like the plugin does not find installed certificates in Explorer stores.
    The 2th and 3th connection retry use an erroneous URL.
    network: Connecting https://myorganisation.nl/TEST/test.jar with proxy=DIRECT
    security: Loading Root CA certificates from <jre-home>\lib\security\cacerts
    security: Loaded Root CA certificates from <jre-home>\lib\security\cacerts
    security: Loading SSL Root CA certificates from <jre-home>\lib\security\cacerts
    security: Loaded SSL Root CA certificates from <jre-home>\lib\security\cacerts
    security: Loading Deployment SSL certificates from <user-home>\Data\Sun\Java\Deployment\security\trusted.jssecerts
    security: Loaded Deployment SSL certificates from <user-home>\Data\Sun\Java\Deployment\security\trusted.jssecerts
    security: Loading certificates from Deployment session certificate store
    security: Loaded certificates from Deployment session certificate store
    security: Loading certificates from Internet Explorer ROOT certificate store
    security: Loaded certificates from Internet Explorer ROOT certificate store
    security: Checking if certificate is in Deployment session certificate store
    security: Checking if SSL certificate is in Deployment permanent certificate store
    network: Connecting https://myorganisation.nl/CGI-BIN/nl/myorganisation/test.class with proxy=DIRECT
    security: Loading certificates from Deployment session certificate store
    security: Loaded certificates from Deployment session certificate store
    security: Checking if certificate is in Deployment session certificate store
    security: Checking if SSL certificate is in Deployment permanent certificate store
    network: Connecting https://myorganisation.nl/CGI-BIN/nl/myorganisation/test.class with proxy=DIRECT
    security: Loading certificates from Deployment session certificate store
    security: Loaded certificates from Deployment session certificate store
    security: Checking if certificate is in Deployment session certificate store
    security: Checking if SSL certificate is in Deployment permanent certificate store
    load: class nl.myorganisation.test not found.
    Does anybody have any suggestion ?
    Thanks and greetings,
    Marc

    First, Java plugin don't use browser https connection starting JRE 1.4, for running an applet in https server, the browser need to establish a https connection first, then Java pugin will use another https connection.
    Second, Java plugin can read certificate from browser, starting JRE 1.5, you can go to Java control panel, Advanced tab, under security, check on the box:
    "Use certificate and keys in browser keystore"
    This way the Java plugin will read the certificate from browser too. (It will work automatically in IE browser, if you use Mozilla, you have to install JSS package first).
    To answer your question, you can either turn on that option or import https certificate into JRE keystore (using Java control panel) for https connection.
    Hope that answered your question.
    Dennis

  • Browser settings to accept unsigned applets

    Hi,
    I'm writting an applet that uses a socket, therefore I need to sign my applet to view it into my browser. So every time I change my code I need to resign the applet.
    Can I set my browser so I will accept unsigned applet?, this will be a lot easier to test and change the code of the applet.
    I'm using a IE6 browser.
    Thanks in advance,
    Pieter

    Yes if you have a JRE installed.
    You can edit your java.policy file so that any java applet started on your machine will be given all priviledges.
    Obviously for general use(i.e. untrusted applets) this would be quite dangerous.
    You can add the following to your java.policy file....
    grant{
    permission java.security.AllPermission;
    };

  • Connecting to a remote servlet from an unsigned applet

    My applet connects to a remote servlet (on a different server). I could obviously connect to it fine with a signed applet, but now my applet is no longer signed.
    I understand an unsigned applet can access a servlet on the same web server host, but the problem is that the servlet is on a different server...
    Is there some simple way I can create a file (html or whatever) on the web server host that can accept requests from the applet and redirect them to the remote servlet?
    Cheers,
    James

    If I understand what you're saying, no.
    But perhaps you can install the applet on the server that you want to connect to.

  • 1.5 allows setStub() by unsigned applets?

    I have an applet that is embedded in a JFrame. It worked fine in 1.4 but I just tried j2re-1_5_0-beta2-windows-i586 and get "java.security.AccessControlException: access denied (java.awt.AWTPermission setAppletStub)...
    at java.applet.Applet.setStub(Unknown Source)"
    Is setStub() not allowed by unsigned applets in 1.5?
    Thanks

    I have the same problem.
    Trying to track it down, did you get any feedback from anyone ?

  • File Access with unsigned Applet through editing the java.policy file

    I'am starting to lose my hair on this...
    I am trying to get an applet to run so that it can access the file system to move files on my local maschin. Because this applet is only running on my VM i can change the java.policy to avoid the signing of the applet.
    first of all, if i wrote in the java.policy file
    grant {
      permission java.security.AllPermission; 
    };everything is working perfekt.
    But I have not the intention to open the gates for any applet out there, so i want to limit the access to my applet. With every of the following versions I get at best an
    java.security.AccessControlException: access denied (java.io.FilePermission...
    My Setup
    My Java Version: jre1.6.0_02
    My applet is located unter the url
    http://admin.mydomain.com/applet.jar
    In Html i tryed the following different versions of loading the applet - none worked
    <applet codebase="http://admin.mydomain.com/" name="shortcut" code="start.class" archive="applet.jar" width="0" height="0"></applet>
    <applet codebase="http://admin.mydomain.com" name="shortcut" code="start.class" archive="applet.jar" width="0" height="0"></applet>
    <applet name="shortcut" code="start.class" archive="http://admin.mydomain.com/applet.jar" width="0" height="0"></applet>in java.policy i tryed following versions with every html applet load version
    grant codeBase "http://admin.x-press.de/-" {
      permission java.security.AllPermission; 
    grant codeBase "http://admin.x-press.de/+" {
      permission java.security.AllPermission; 
    grant codeBase "http://admin.x-press.de/applet.jar" {
      permission java.security.AllPermission; 
    };why is it with
    grant {
      permission java.security.AllPermission; 
    };working, and not with the other versions?
    i am almost bold now, please try to save my last hair from falling down.
    any suggestion would be nice
    thanks, feyyaz
    Message was edited by:
    feyyazdogu

    I read the mentioned documentation and your right, some of my versions were wrong, but after reading the doumentation again i came to following result which should had worked but didn't.
    java.policy
    grant codeBase "http://admin.mydomain.com/*" {
      permission java.security.AllPermission;
    HTML File
    <applet codebase="http://admin.mydomain.com/" name="shortcut" code="start.class" archive="applet.jar" height="0" width="0"></applet>if I am entering http://admin.mydomain.com/applet.jar i can download the jar, so the archive lays in the correct directory.
    what i am doing wrong? do i have to change an additional file somewhere else?

  • SAXParser inside unsigned Applet: Validation with DTD

    Hello!
    I am trying to run an applet that performs some XML parsing ideally with DTD validation.
    The issue is that I can't access files directly, but using tricks such as Class.getResourceAsStream() which I can do fine for my XML file my XML file. But then this xml has a reference to test.dtd (also in the jar file).
    When the parser runs, it tries to open test.dtd "illegally" and a security exception is thrown. Any advice in how to avoid this?
    BTW, I have already thought of:
    * Traslating the DTD to a Schema
    * Disabling validation
    Would work, but not the solution I'm looking for :)

    It doesn't seem like the SAXParser allows it, but if you use an XMLReader, you can specify an EntityResolver class.
    The EntityResolver is called when SAX wants to open a resource. Your code can supply an InputSource to point to the resource you want.
    Dave Patterson
    Message was edited by:
    d.patterson

  • WebStart Applications have same security level like unsigned Applets

    Hi,
    I have coded an Applet that can connect to data of my server using new URL(getDocumentBase(), "localfile.bla");, but now I have converted it to an application loaded with WebStart. I can't access the data with new URL("http://www.myserver.com/localfile.bla");, but a I don't have a DocumentBase, too. Do I Have to set an argument in the jnlp file with the DocumentBase, in order to access local data?
    Or are there any other possibilities?!?
    Thanks,
    Greets

    You have to set the code base in your JNLP file in the codebase attribute of the <jnlp> element:
    <jnlp spec="1.0" codebase="www.myserver.com">
    </jnlp>You should then be able to get hold of the code base from within the application using the following code:
    import java.net.URL;
    import javax.jnlp.BasicService;
    import javax.jnlp.ServiceManager;
    URL codebase=((BasicService)ServiceManager.lookup("javax.jnlp.BasicService")).getCodeBase();

  • Reading from the Applet's JAR file.

    Is it possible to read a file stored in the jar file that the (unsigned) applet is being executed in? I have a line that goes like (in is just an InputStream):
    in = getClass().getResource( "/exercise.xml" ).openStream();
    and then, in another class, i do (bulider is an instance of javax.xml.parsers.DocumentBuilder, created from the DocumentBuilderFactory class):
    doc = builder.parse( in );
    but this always results in a security exception (works fine from the applet viewer). I tried specifying the full path to the .jar file as the codebase, but got the same results. I have not tested this from an actual web server, i am only opening the .html file directly in IE.
    Due to the nature of the application, it is not possible to host the file seperately on a webserver.
    It seems to me that there is no reason an applet shouldnt be allowed to load a file from the .jar it is executing in, could this simply be a problem of the file being local, and thus linked to from a file:// tag?
    Thanks for any help.
    Thomas Stephens

    Hi Guys
    I have figured out this problem. It's got to do with classloader.
    Applet uses a separate classloader. So using the static getSystemResource(),
    we never get contents from applet jar files. The following will work nicely.
    It is noted that you must loacate the applet classloader as in the first line
    and use the non-static method getResource();
    ObjectInJar obj = new ObjectInJar(); // create an object with a class in the jar file.
    ClassLoader cl = obj.getClass().getClassLoader();
    InputStream stream = cl.getResource("your_filepath_in_jar").openStream();
    Cheers.

  • Multiple instances of the same applet loaded causes problem

    I have a java applet that has several classes in the project. The applet has a JTable a JButton and a JLabel control. The applet is displayed within an HTML page. The problem is that if a user opens the same html page more than once with the applet in it, only the last applet loaded receives the screen updates.
    For example in one senario. I have an error message that displays in the Label control once they click on the button.
    The user opens the html page and the applet is loaded (window 1). The user then opens the same html page again (window 2) with window 1 still open. If the user clicks on the Button in window 1, the error message is displayed in the window 2 applet.
    Originally I had some static variables. Thinking it was being used globally by the JVM so I removed all of them and it still happens. I have tried using both the Applet and Object tag. But it still happens.
    Has anyone experienced this before? Any suggestions on how to make the applet update the instance that recieved the events and not just the last one that was loaded?

    You need to look at applet classloader issues. If applets have the same archive list and come from the same codebase, they have the same classloader. A class is namespaced by it's class + classloader. Any statics in a class with a classloader will be shared. If you instead make it such that your applets have unique classloaders (which you can't change for unsigned applets by yourself) by changing the codebase, that would be one solution.
    For other solutions, I recommend searching the forum. This issue comes up a lot.

  • Multiple-jar applet question

    Here's a basic question that none of the examples seem to address. If my applet is comprised of multiple jars (some dynamically loaded based on system configuration), do they all have to be signed, or does just the jar file containing the applet entry point need to be signed?
    Conversely, could it be that only the jar files that contain code that wants to write files to the local file system need to be signed, or does everything need to be signed?

    Conversely, could it be that only the jar files that contain code that wants to write files to
    the local file system need to be signedThe Stack needs to be "trusted" code. If an unsigned applet "not trusted" calls a method
    of the signed applet it should not be allowed to do "trusted" things.
    One example is when you call a public method of the applet from javascript. There is a
    sollution other that signing all.
    http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
    second post

  • Applet in Apple Mac OSX problem

    Hi all,
    have developing an applet long while using WinXP platform, everthing seem ok, but when i try over Apple Mac OSX, i has a loading problem saying that init failed to load ArrayList as error message said:
    ArrayIndexOutOfBound, 0...
    but when i debug print out the ArrayList content and its length, i'm sure that this ArrayList is NOT NULL and its length is NOT ZERO either. what is happening here? oh, ya, this only happen in Safari, in FireFox for Mac no problem, even Camino also pass the test, why? anyone have idea about this? because i'm new to Apple Mac.
    also, there is another question whereby, when i use FireFox for Mac to load the applet, the applet load seem no problem but it just can't display properly. what i mean is that in Windows platform (IE6), this applet show entire applet successfully, but when i try it in Mac, it show only a part of applet without any error, but when i try to refresh the page, applet is now successfully show, why?
    lastly, when a button of an applet being click and this will bring a new window with some parameters value, its work on IE in Windows platform, why it won't work for FireFox or Safari for Mac? i see prompt out saying is security problem, is there any workout of this? thanks. to summary out of junk above:
    _______________________________FireFox_____Safari_____IE
    _______________________________Win | Mac_____Mac____Win
    1. load applet for 1st time___________OK_|_NO_____FAIL____OK
    2. refresh applet after 1st load failed___OK_|_OK_____FAIL____OK
    3. when applet button click (security)___OK_|_NO_____-_______OK
    p/s: all above test was using same applet with same parameter and value.
    below is the sample i capture from Apple Mac just now:
    http://img.photobucket.com/albums/v660/ahbeng78/Apple_Mac.png
    Message was edited by:
    ahbeng78

    i has a loading problem saying that
    init failed to load ArrayList as error message
    said:
    ArrayIndexOutOfBound, 0...Well, post the stack trace.
    but when i debug print out the ArrayList content and
    its length, i'm sure that this ArrayList is NOT NULL
    and its length is NOT ZERO either. You can still get an out of bounds exception with those conditions. The list could exist, its length could be N, but you're trying to dereference position N + 5, for example.
    try it in Mac, it show only a part of applet without
    any error, but when i try to refresh the page, applet
    is now successfully show, why?My guess is that you're not calling repaint() when you should, but that's just a guess.
    lastly, when a button of an applet being click and
    this will bring a new window with some parameters
    value, its work on IE in Windows platform, why it
    won't work for FireFox or Safari for Mac? i see
    prompt out saying is security problem, is there any
    workout of this? thanks. to summary out of junk
    above:Often you can sign applets so they can do things that unsigned applets aren't allowed to do.
    Maybe you're making some kind of security mistake that Firefox and Safari are (properly) catching but IE isn't. In any event, post the error message.

Maybe you are looking for

  • IPhone won't play music.

    I have a new iPhone 5s that I set up from an iCloud restore. All of my music is showing up on the phone but none of it will play. It looks like it is downloading on to the device but its been almost 24 hours and only a few songs have downloaded.The s

  • Unmountable Boot Volume error

    After installing windows on my mac ive tried toget into it again but a blue error screen appears with UNMOUNTABLEBOOTVOLUME. I cant seem to switch back to mac as i didnt have the latests service package i needed to install it anyway so i turned off n

  • Adding Alternative Unit of Measure to Outbound idoc

    Hi gurus, I need to add alternative unit of measure information to an outbound ORDERS idoc for each line item segment. How do I know what segments and qualifiers to use? Thanks! Will

  • One vote for a javax.jms.MapMessage

    I need to send and receive MapMessages to integrate with other Java clients in my Flex app however i have seen that in the documentation message-type parameter of the jms property of a message destination only accepts javax.jms.TextMessage and javax.

  • Why Is My Leopard So Buggy?

    I question why I upgraded to 10.5.1 almost everyday because of these problems. Should I re-install Leopard? Problems: More program crashes than Tiger Screen sometimes does not turn on after in sleep mode Randomly files will disappear from the desktop