reading files and displaying info about them. applet, servlet, or combo?

I have written a class java that reads the directory of files, then reads each individual file looking at file sizes and different records inside the files. It works fine until I make it an applet. Then it gets a java security manager error.

When I read about applets, it seams that they cannot read files on a server, i. e. you have to be a servelet.

I am stuck now, because not only do I need to read files, but display them back.And it appears that servelets cannot display stuff.

So basically I feal screwed.

Any light you can shed on this I would appreciate.

Thank you.

[615 byte] By [jagossagea] at [2007-11-27 6:55:37]
# 1

Servlets can "display stuff", and applets can "read files on a server" (though the latter may be a little more complex, depending on the environment). The security manager issue can be resolved by understanding [url=http://java.sun.com/sfaq/]applet security[/url]. The servlet issue can be resolved by understanding [url=http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Servlets.html#wp69957]servlet technology[/url].

Let us know if there is a specific issue we can help with by providing explicit details.

~

yawmarka at 2007-7-12 18:32:17 > top of Java-index,Java Essentials,New To Java...
# 2

I cannot find a file on my PC named properties. I do not know if it has a suffix or not. I also have no directory called hotjava.

I want to test using appletviewer on my PC before trying it on the server.

Using appletviewer, the applet does not initialize. When I close the explorer, the DOS screen shows some security problems :" java.security.accescontrolexception: acess denied (java.io.filepermission.read) at java.security.accesscontrolcontext.checkpermission(accesscontrolcontext.java:264).............."

I have created a file called properties in the jdk1.5.0_11/bin directory with acl.read=c:

Same errors.

I created a hotjava directory and created the properties in it also, but got the same thing.

Please help.

jagossagea at 2007-7-12 18:32:17 > top of Java-index,Java Essentials,New To Java...
# 3
> Please help.Please refer to the applet security link in my previous response.~
yawmarka at 2007-7-12 18:32:17 > top of Java-index,Java Essentials,New To Java...