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

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

  • How do we create Hyperlink to local file on c:\ in Web Intelligence

    How de we create Hyperlink to local file on c:\ in Web Intelligence.
    Thanks in advance,
    K.

    K,
    You can't hyperlink to a local file when you are in WebI.  The ability to hyperlink requires the http protocol to be employed, wrapped within a web service (like IIS, for instance).  So to hyperlink to any file, that file must be a part of a web service, and the web service must have access to the folder (again, like in IIS you must create web shares and IIS must "mount" those shares in an http environment).  Hopefully I'm making sense to you on why it can't be done. 
    On the other hand, content that is static and has been made available for browsing on the web can also be linked to by populating a cell in a WebI report, marking that cell as "read cell contents as hyperlink", etc, etc.
    Thanks,
    John

  • How do a client access the WAR file at loading a URL?

    I would like to apprehend that how do a client access the WAR file at loading a URL?
    Actually a web containter,for example,servlet container can have the software tool such as iPlanet[tm] Application server to deploying the servlet classes and JSP files by containing the WEB-INF directory.
    how could the process of request and reponse be done by employing the WAR file..plz steer me....

    clients don't access a war file. that's just a package for the container to deal with.
    when the WAR is deployed, the container unpackages the contents and deploys the app. From that point forward clients use the deployed stuff. the unpackaged servlets handle requests from then on.
    your question makes little sense to me.
    %

  • How to make Finder NOT to show files from a specific folder in "All My Files"?

    Hello!
    Can someone please advice how to make finder NOT to show files from a specific folder in "All My Files"? See the attach - I recently installed Civilization 5 from Steam and now I have a lot of unneeded files (*.log and *.ini) shown in  All My Files colder in Finder.
    I don't want to see them. Any advise?

    Using "All my Files" was very handy before all this rubbish popped up. =(

  • How to make Javascript access standard JSF component

    Hello all,
    I'm in need of a proper javascript code that access standard jsf component.
    Like we do for html tags;
    if( el.tagName.toLowerCase() != 'select')
    I need to do the same thing for a jsf tag i.e; <h:selectOneMenu>. How to make javascript access <h:selectOneMenu> like it does with <select> tag ? Please let me know asap. Extremely sorry if the question is kind of stupid....cause I'm a beginner for JSF environment.
    Any sort of help, suggestion or advice would highly be appreciated.
    Thanks in advance.

    Ummmm, I may be off the beaten path, but by the time your javascript is called the h:selectOneMenu would be a select tag within the dom. You should be able to reference that tag as you normally would.

  • How can my laptop access the downloaded files like mp3 and pdf documents which are in my iphone 4G?

    how can my laptop access the downloaded files like mp3 and pdf documents which are in my iphone?

    Yes you will need to NAT at some point to go from private to public address space. Here is a basic configuration if you are interested:
    interface F8
    ip nat inside
    interface G0
    ip nat outside
    ip access-list standard NAT
     permit 192.168.11.0 0.0.0.255
    ip nat inside source list NAT interface G0 overload

  • Access to local file system for desktop application

    As a .NET and VBA developer/user, I have found Flash to be a
    great RAD development solution for certain desktop app. projects...
    if only actionscript could access the local file system and talk to
    local (preferably non-XML) data-sources!
    I'm not familiar with the latest version of Flash CS3 &
    Actionscript 3.0
    Is there any reliable way Flash CS3 can be programmed to access
    the user's local file system - that is, as a stand-alone desktop
    application????

    Thanks for the response.
    I hope Adobe catches a clue ... with Microsoft's Windows
    Presentation Framework and the new ability of easily implementing
    Flash-like animation on .NET apps, Adobe is going to have to get
    busy. Stand-alone desktop apps still rule (as opposed to web-based)
    in the business world, and they are driven by data. If Flash was
    capable of easily talking to local data-sources (Access, Excel,
    Text etc.), it could significantly increase its adoption as a
    widely used business RAD tool. The Flash IDE is great and rivals
    any Microsoft RAD IDE + users love the slick Flash GUIs.

  • How to make mplayer play 3gp type files ??

    how to make mplayer play 3gp type files ??
    I downloaded a Japanese blue movie by amule, but I cannot play it!

    Army wrote:Actually, a few weeks ago, opencore-amr went into [extra] and ffmpeg and mplayer are being compiled against it, so Arch's mplayer should support 3gp files ootb including audio. Video playback was never an issue, because 3gp is just a container, the video codec is usually h263 or h264, which are no problem for mplayer.
    Very new versions of FFmpeg have native amr-nb support. I'm not sure if it happened before or after the most recent FFmpeg bump in the repos.

  • How to make photoshop cs4 open dng files?

    How to make photoshop cs4 open dng files?

    They are opened by Photoshop through the ACR plug-in you should make sure the ACR 5.7 update is installed for your CS4.
    Adobe - Photoshop : For Macintosh
    Adobe - Photoshop : For Windows

  • How do you gain access to all files on different users?

    How do you gain access to all files and folders for each user?

    http://forums.whirlpool.net.au/archive/718273

  • I got a new computer, and now i cannot access the local files for my website (Dreamweaver)...help?

    I got a new computer, and now i cannot access the local files for my website (Dreamweaver)...
    the new computer is a Mac.
    I see the site on my computer files, but it will not connect with Dreamweaver on this new computer.
    can anyone help with this?
    thanks,
    Margaret

    no special characters...
    see if this gives you any info...

  • How can an applet access a file ??

    I have written an applet in Netbeans and it is working ok.. Now I need to embed this applet in an html file. I have used the following code for doing so :
    <Html>
    <Head>
    <Title>Java Example</Title>
    </Head>
    <Body>
    This is my page<br>
    Below you see an applet<br>
    <br>
    <Applet Code="MyApplet.class" width=200 Height=100>
    </Applet>
    </Body>
    </Html>Now when i run the html file.. the applet does not run. It gives an error called Applet notinited.
    Java console contains this :
    java.security.AccessControlException: access denied (java.io.FilePermission C:\postplotter.txt read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkRead(Unknown Source)
         at java.io.FileInputStream.<init>(Unknown Source)
         at java.io.FileInputStream.<init>(Unknown Source)
         at java.io.FileReader.<init>(Unknown Source)
         at finalpkg.trial.init(trial.java:54)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)Please help. I think the problem is because the applet needs to access this file called C://postplotter.txt
    Edited by: sauvikc on Jul 25, 2008 7:33 AM

    I wrote the applet in Netbeans and its working fine when I run it.
    Now I need to run this applet on a different laptop, which does not have NetBeans. It has C://postplotter.txt with the necessary data.
    I am using FileReader to read the .txt file :
    try {                                           // Extracting parameters from the .txt file.
                String url = "C://postplotter.txt";
                FileReader input = new FileReader(url);
                BufferedReader bufread = new BufferedReader(input);
                String[] line  = new String[15];
                for (int i=0; i<15; i++) {
                    line[i] = bufread.readLine();
                    System.out.println(line);
    Please let me know how to go about doing this. (Opening the applet on the laptop).
    I would like to be able to write an html file which has the applet embedded in it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to access the local files (Excelsheet) in bsp application

    Hi sdn,
    I created a bsp application my requirement is if i click the link it should display the excelsheet and if i perform any updations those updations will be modified int that excel sheet so can any one plz help me out in solving this issue.

    Hi,
    I think you shouldn't try to modifiy local files from a server application for security reasons.
    But, let's say you have your reasons.
    In your BSP, you have a link that points to an MS Excel file. Clicking this link will open the file in MS Excel and users will be able to modify and register it (and save the file in another path/name...).
    Another solution would be: create a table form (like ALV?) from the Excel file and save any modifications of the table form into the Excel file. Maybe HTMLB can supports such approach but I don't know HTMLB. I only use HTML and ABAP.
    All I said here is just overview of potential solutions. I'm not sure I exactly understood your need. Perhaps other Experts would have better answer for you.
    But I hope this will help you.
    Good luck!
    Thomas.

  • RDS 2012 R2 - How do I lockdown access to Local Computer Management and Windows Backup via Group Policy

    Greetings all,
    I am needing assistance in how to lockdown access to Local Computer Management and Windows Backup via Group Policy for users that access RDS service. I have followed this awesome guide - h t t p://w w w.it.ltsoy.com/windows/lock-down-remote-desktop-services-server-2012/
      - but it is missing two important resources that I would like to lock down.Currently, I have successfully locked down Control Panel for users via Group Policy, but I cannot find any group policy or guide on how to restrict user access
    to Computer Management (different to Server Manager). When using Win-X shortcut to open the 'Administrator's shortcuts' near the windows icon, I have locked down everything except Computer Management. Computer Management gives direct access to Disk Management,
    Shares etc, which are locked down for users. But Windows Server Backup is still accessible. Can someone please guide me on how to restrict access to both Computer Management and Windows Server Backup.
    Thanks in advance.
    Terry.

    Prevent running of Windows Server Backup
    Computer Configuration\Policies\Windows Settings\Security Settings\File System
    Right click on File System - Add File - Drill down to \System32\wbadmin.msc
    On the Database Security ACL that pops up - Remove Creator Owner, Remove Users and check Adminstrators have Full Access.
    On the Object window - choose Propagate inheritable permissions to all... (Default)

Maybe you are looking for

  • Owb Process Flow getting hanged/stuck .

    Hi, Problem description  :-  We have designed a Process Flow in OWB our project. The Process Flow is scheduled to run at 12.00 AM daily Dutch timings. We have been facing a problem for around 3 months wherein the process gets hanged/stuck in between

  • How to create a calendar on iOS 7?

    How to create a calendar on iOS 7? I want to use dayforce to upload my work schedule onto my iPhone but I can't create a calendar on my phone... Help?

  • Major Ipod (60GB VIDEO) problem

    I've just bought my first Ipod and I'm really disappointed.I installed Itunes and the ipod software,updated it and got my songs.After like 30 minutes and I don't know how and why my pod freezed in LOCK mode,I can't do anything on it,I disconnected it

  • Problem to unbolt my Blackberry continuation has a putting has in the daytime

    Hello, I have make a putting has in the daytime of my Blackberry curve 9300 has the assistant of the BlackBerry software desktop software, and since impossible to serve again to me of my telephone because I cannot unbolt him any more. As soon as I li

  • Failing ODS activation

    Hello all,     I am on BW 3.5.  I have an ODS that serves as a datasource for five cubes and another ODS.  This source ODS loads these targets every day, and has been in place for years.  No changes have been made recently to any of the involved stru