The Artima Developer Community
Sponsored Link

Java Answers Forum
about security manager in applet/tomcat

1 reply on 1 page. Most recent reply: Jun 16, 2002 9:54 PM by Charles Bell

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Binod Pokharel

Posts: 9
Nickname: binod
Registered: Mar, 2002

about security manager in applet/tomcat Posted: Jun 13, 2002 1:12 PM
Reply to this message Reply
Advertisement
Hi,

In one of my application I am using applet and servlet and trying to run using jakarta-tomcat-3.3.

one of my applet tries to open the internet explorer using

Process p = System.getRuntime();
p.exec(iexplore url).

For some reason I cannot use showDocument thing here.

I have also tried using
p.exec(start http://sitename).

The problem is that on doing this I get an error saying that java.security.AccessControlException, access denied - "java.io.FilePermission" error.

I am pretty sure it has something to do with the security manager. Can anyone help me with the quick way to bypass this security thing.

I would appreciate a lot because I really need this.

Bye
Binod


Charles Bell

Posts: 519
Nickname: charles
Registered: Feb, 2002

Re: about security manager in applet/tomcat Posted: Jun 16, 2002 9:54 PM
Reply to this message Reply

public void setFields(File propertiesFile){
Properties properties = new Properties();
try{
properties.load(new FileInputStream(propertiesFile));
String isdn = properties.getProperty("ISDN");
String title = properties.getProperty("Title");
String author = properties.getProperty("Author");
String edition = properties.getProperty("Edition");
String year = properties.getProperty("Year");
String price = properties.getProperty("Price");
String comments = properties.getProperty("Comments");

isdnField.setText(isdn);
titleField.setText(title);
authorField.setText(author);
editionField.setText(edition);
yearField.setText(year);
priceField.setText(price);
commentsField.setText(comments);

}catch(FileNotFoundException fnfe){
System.err.println("FileNotFoundException: " + fnfe.getMessage());
}catch(IOException ioe){
System.err.println("IOException: " + ioe.getMessage());
}
}



import edu.stanford.ejalbert.BrowserLauncher.*;
import java.io.*;
import java.net.*;

public class Launcher {

public static void main(String[] args){
Launcher launcher = new Launcher();
launcher.init();
}

public void init(){
try{
edu.stanford.ejalbert.BrowserLauncher.openURL("http://http://www.artima.com/");
}catch(IOException ioe){
System.err.println("IOException: " + ioe.getMessage());
}

}
}

Flat View: This topic has 1 reply on 1 page
Topic: Calling Jsp using <A HREF> tag in html Previous Topic   Next Topic Topic: convert to Int

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use