Applet access question

hi!
I have an applet , the applet functions as a server .
the server suppose to work on the users computer , meaning all the sockets and ports will be opened on the users computer not on the host where the applet sits .
then i want the applet to write a log , but i want her to write it on hte host where she sits and not on the users computer .
how do i tell the applet on what computer to act ?
(host or client)

can someone help ?
how do i determine where the action will take place , in the host or in the user?

Similar Messages

  • How do I grant applets access to local resources?

    Hi:
    I know that for a remotely loaded applet to access local resources the applet must be signed. But, creating a jarfile and signing it for every step in the development is tideous. Is it possible for a locally loaded applet to access local resources without signing the applet?
    Secondly, I found some resources mention that signing is not enough. Is this true? if so, how do I request access to a particular resource?
    Thanks, Erik

    Things work on the command line but fail as applet. I need to figure out why.
    One problem seems that calling applet methods from a java script run on the onload event fail because the applet is not yet initialized. But moving the function to a user initiated event did not solve the problem.
    I need to get access to a smart card reader and load the card, I do really simple stuff: check if the card is inserted and get the length of the ATR code.
    So, there is some missing link and I suspect it may be managing the security parameters. I know about signing but nothing else. What do I need to do to grant my applet access to local resources?
    Thanks, Erik

  • Applet db access questions

    Hi all,
    I'm pretty new to applets. Can someone tell me:
    1. Are there any major issues with communicating wtih mysql at run time?
    2. To dynamically retrieve files from the server, are there security issues?
    The reason for #1 is I would like a bit of warning before I get to the database portion of the applet
    The reason for #2 is I tried pulling in a few sound files depending on the user's choice and I kept getting an security exception.
    Thanks in advance!

    By default applets can't access hosts other than the one it came from.
    If you access a database (or any other resource, for that matter), you're basically exposing authentication credentials (unless the user types them in themselves). So it's good if you can only access stuff that should be publicly accessible. I don't know if mySql allows for any kind of anonymous access.
    Hope this helps.

  • Simple applet jar question

    I'm sure this is an easy question, but how do you access subdirectories in your applet's jar file?
    For instance the contents of MyApplet.jar jar would be:
    * META-INF
    * images
    * net
    Say the main class is MyApplet.class in net/mydomain/myproject
    How in the main class would I get at images/MyImage.jpg?
    Obviously I did not get this code to work:
    ImageIcon upIcon = new ImageIcon("images/MyImage.jpg");
    Thanks alot!

    Actually now I am using:
    ImageIcon upIcon = new ImageIcon(MyApplet.class.getResource("/images/MyImage.jpg"));
    This way the 'absolute' resource is found (becuase the resource name starts with a '/').
    This seems to be the best way to do it.

  • Many applets accessing a writing servlet ...

    i have a game - applet which includs a highscore. to save the scores permanently theres also a servlet for accessing the server resources. so if theres a new highscore reached the applet sends it to ther servlet, which writes the score in a txt-file on the server.
    but im smelling problems if several applets are running at the same time:
    for each applet instance a unique servlet connection is created for highscore entry. so only crap would happen if one connection writes to the file, another one reads at the same time and so on.
    how can i safely synchronize the data ?
    btw: for this project i have no access to a database (which would make many problems obsolete ...)

    thought about something similar but theres the question about how to realize the lock. if servlet instance A gets an update an writes to the file, a variable gets locked ( perhaps over a static variable ? is every servlet instance accessing the same static var like in "normal" applications ?). then servlet B posts the new score in a query (then static, too). hmmm, now which one writes the query ? perhaps the servlet which just wrote and then tests if there are more to write ? it shouldnt happen, that different servlet feel responsible for writing the query ...

  • Applet accessing local files under Vista

    I have a signed applet that accesses files on the client machine. This applet is not able to open files when running under Windows Vista (I get an "Access denied" message). I found that in C++ there is a function called GetTempPath, which returns a path to a directory where and OCX control can access files. So here is my question:
    Is there some Java function that will return the path to the directory mentioned above?
    Thanks for your help.

    Sorry, DrClap, but...
    Post 1: "I have a signed applet that accesses files on the client machine. This applet is not able to open files when running under Windows Vista (I get an "Access denied" message)." While he mentions temp files/dirs, that is not, IMO the issue, because...
    Post 6: "Under these OSs [XP, 2000], my applet uses a directory called c:\program files\mydir. This applet is not able to access files in the same directory under Windows Vista, access is denied in this case." The specified directory is not a "temp" dir as typically returned by the system parameters that I've ever seen, so I'm assuming he's using this explicitly. In which case, access is denied writing to it. In which case, it appears to be a signed applet permission issue.
    While the java.io.tmpDir system param may be giving an issue to, that doesn't seem to be the key point in what I'm reading. Otherwise it's not written entirely clearly.

  • Can applets access Internet?

    Hi everybody!
    I need to access another website from an applet.
    This is forbidden by security restrictions. Can I do it if a sign
    the applet? And if so, than how do I do it?
    Thanks,
    Sergey.

    What kind of stuff are you trying to access across the internet? Do you intend for the applet to download information (such as a txt or data file) from a server? If this is the case, in my experience, you must write a very small datagram server program that you must install on the server you're trying to access. Likewise, the applet must have some kind of datagram client routine in it. The mini server and the applet must both use the DatagramSocket and DatagramPacket classes. If you do not have access to the remote server to install software on it, then I think you might be out of luck.
    There is an entire tutorial on this subject at:
    http://java.sun.com/docs/books/tutorial/networking/datagrams/clientServer.html
    I hope I answered your question.

  • WRT54GS V6 access question.

    Just set up the network.
    WRT54GS with a Wireless-G USB adapter
    2nd pc is linked and working great!
    Question is: How do I access the 2nd pc from the 1st pc?
    I click on my computer > network places > view computer work groups.
    When I click on the 2nd pc it ask for a password. Where would I find the password to access the 2nd pc? I checked the Easylink advisor but can't find anything.
    Anyone know? I would like to transfer files from one pc to the other.
    Message Edited by asgrafxx on 02-10-200712:09 PM

    Hi… This is the login password for you PC and nothing do with your router or adapter. If you have setup any account on this computer such as administrator or any other, you can provide login credentials for the same and access the shared resources on that PC.

  • How to make applet access a local file in intranet?

    I want to have my applet read from and write to a file on the user's PC. This is our company's intranet and security is not a concern so we don't want to go through the complicated certificate procedure.
    Our application server is weblogic. The jsp containing the applet can be accessed at http://10.150.20.100:7001/slfweb/jsp/Home.jsp. According to Core Java (Volume II), I put the following paragragh into java.policy file under jre/1.3.1/lib/security dir of each user's PC, hoping this will grant the permission for the applet to read/write a file in tmp dir:
    grant codeBase "10.150.20.100:7001/slfpweb/" {
    permission java.io.FilePermission "C:\\tmp\\*", "read, write";
    However, it does not work. Can someone tell me what is the simplest way to allow an applet to read/write a local file in intranet system?
    Thank you very much!
    Ming

    I guess the reason you're still running into permission problem is that you have not addressed the required settings in the browser(s) that you're using.
    On everyone's PC, the following must be done:
    1) on IE, click Tools | Internet Options | Security . Under Trusted Sites, add your server's IP address. Under Local Intranet, reset it to Medium or Low and check to see if any of the relavant settings require attention (note that a Java Applet is equivalent to an ActiveX object in IE) . Finally, go into Java Custom Settings and make the appropriate changes.
    2) on NN, to access local files, you can enable Codebase Principals by adding the following line to the user's pref.js file (look for it where NN is installed -- usually under C:\Program Files):
    user_pref("signed.applets.codebase_principal_support", true);
    I have also read Core Java and found that the authors have a way of over-simplifying everything and failure to adequately describe other factors that may potentially affect what they're describing.
    V.V.
    PS: Signing an applet with a self-signed certificate is not all that difficult. Here is a link to my file i/o applet that contains pertinent info that you might want to look into:
    http://home.attbi.com/~aokabc/FileIO/FileIOdemo.htm

  • Can applet access oracleDB which not on the Web server

    can anyone tell me if I could use applet come from a Web server to access oracle DB on the other workstation, how to do it

    teekay wrote:
    It should work already as the default config also sets an /owncloud alias. If it doesn't work, try
    ln -s /usr/share/webapps/owncloud /srv/http/owncloud
    It worked before when I first tested owncloud (6 months ago)
    the symlink works if I remove apaches owncloud conf file.
    I'll mark this as solved, but it should work with the conf file in place, not the symlink on the filesystem.
    Thanks, I don't know why i did not try that before

  • Applet accessing temp directory in Vista

    My signed applet requires access to a directory where it can read/write files. Apparently the temp directory is one place where an applet can do this. The method System.getProperty("java.io.tmpdir") returns the path to the temp directory on Windows XT or 2000. But Vista denies access to reading this property. I also tried System.getProperty("user.name") with the same result.
    Any suggestions on how to get the path to the temp directory under Vista, or some other low security area where a signed applet can read/write files?
    Thans for your help.

    Don't double-post:
    http://forum.java.sun.com/thread.jspa?threadID=5172452

  • Expanding network with TC and access question

    Hi All
    I need to look at a new external hard disk since my current 160gb is just getting too full, so I figured it might be time to get a Time Capsule, probably the 1tb.
    I've got two questions before I do..
    1. Currently I have Sky Broadband. I've read a lot of people saying that it is not possible to make TC part of the existing network through wifi so have to connect. If thats the case I'm probably better off with standard network drive. Has anyone managed to do this yet? Im wondering if the reviews I've read are just that people couldn't work it out?
    2. I assume this is the case, but can I access the HD as a standard network drive for general storage? Is it possible to define how much space Time Machine can use say 500gb, and leave 500gb for general usage?
    Many thanks for any answers

    The issue I have is that Sky Broadband forces you to use their router for broadband access. They hide the user name and password on a chip so it is not possible to configure.
    Besides my phone is downstairs and my printer is upstairs in the little office. My plan was to have TC upstairs, with printer connected. Have both the TC and Sky Broadband router all part of the same network.
    Then I'd use a cable to do the first backup and use wireless for incremental backups.
    It does look as though I can't use this configuration. But its a bit strange, I thought it was part of standard wireless networks that you could use access points to extend them. I assume then that apple are not using all of the standards?
    If that is the case, I'd have to plug it into my router as a wired option, in which case any external HD with a network interface will do half the job I need.
    I'm just trying to find out if anyone has managed to get it extended from sky (or other router). Note I can change my sky router settings so in theory could change the sky one to use the apple settings, does that make a difference? Anyone had success that way?

  • Applet access denied  with Tomcat 4.1.29 -- Plz Help

    I searched for answers in the forum and used the jarsigner to certify an applet that uses Oracle thin driver. Modified the catalina.policy to:
    grant {
            permission java.security.AllPermission;
    permission java.net.SocketPermission "127.0.0.1:1024-", "accept, connect, listen, resolve";
              }; I am still seeing this error:
    access denied (java.net.SocketPermission 127.0.0.1:1521 connect, resolve)PLEASE HELP
    Murthy

    Thanks for the clarification! I created a java.policy file on the client. I'm now seeing null pointer for the connection variable. BTW, on the client I saved the java.policy at $HOME and the policy tool says it can't find it!!!

  • DVD @ access questions?

    I am putting together a short promo DVD for a client and I have a catalogue of their products as an image on the DVD that you can access via the main menu. What I want to do is have it so the products are 'clickable' and will take the user [when online] to the clients web site. I did a search but I cant find out how to link this page to the DVD access settings in the inspector. Any help? Also, can you link a button to open up and email application so the user can email direct from watching this DVD? Questions questions questions....thanks in advance. Oh, Im on DVDSP2.

    DVD@ccess is actually quite limited and not entirely compatible with the range of DVD playback software/hardware available on a PC... you might be better off using eDVD from Sonic (which is PC software, making use of the Interactual Player, rather than @ccess).
    However, @ccess links are embedded in to a menu - so any button you have got needs to go to a menu that simply has the @ccess URL embedded and the menu needs to time out to return to where the button was. For launching a web site simply use the standard URL for the site, include the http:// info in that.
    Now, sending an email is not going to work all of the time, but you can try it out and see if it has the functionality you want. The URL to place into the menu for DVD@ccess is the HTML 'mailto' code. simply write:
    mailto:[email protected], replacing name, domain and .com with the revelant info. If you have got the @ccess links enabled on your Mac, try simulating the menu with this in it... you should see Mail launch (it takes a moment for it to appear, but should work). Whether or not this will work on a PC with Outlook I don't know...

  • Applet access local file

    I have an applet that access local files and directory.
    I have create the applet policy file.
    When viewing with appletviewer, we can type:
    appletviewer -J-Djava.security.policy=applet.policy MainApplet.html
    However, when I want to embed the applet in a html, how can the policy file be included?
    Thx a lot.

    how can the policy file be included?Applets use the java.policy wich is located in the jre/lib/security
    (C:\Program Files\Java\jre1.5.0_04\lib\security)
    There is a java.security where you can add or change the java.policy files to be
    used
    policy.url.1=file:${java.home}/lib/security/java.policy
    After changing these files make sure the jre loads again, close all browsers
    and open the page.
    Signing applets:
    http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
    second post and reply 18 for the java class file using doprivileged
    http://forum.java.sun.com/thread.jsp?forum=63&thread=409341
    4th post explaining how to set up your own policy with your own keystore
    Still problems?
    A Full trace might help us out:
    http://forum.java.sun.com/thread.jspa?threadID=656028

Maybe you are looking for