Yes, this is a security question. What you would have to do is to get your applet signed. If you just want to do testing, you can edit your policy file - java.policy(but please remember to change it back after testing). This file is found in the folder c:\Program Files\JavaSoft\JRE\1.3\lib\security\ and c:\jdk1.3\jre\lib\security\. If you are interested to know more, you can reply back to the post
Regards,
Leon If you need additional help, you can email to me at zaoliang@hotmail.com I don't guaranty that I will be able to solve your problems but I will try my best
Thanks for the answer, but it need to work all the time on all computers.
I'll explain the situation:
We've an local intranet, where I would like to use applets to upload some files (read 'copy'). The files are copied to the server in a directory where everyone has the read and write permissions, security is not important. And in the mean time a row is written in a database where what files is located on the server.
All users will use an intranet site with the applet in it,
that's why it may not be an application.
How to make this work not only for testing, but also for using?
I suggest that you seperate this program to use servlets and applets instead of pure applets. Reason being :-
1) It would be too troublesome using applets to save a file onto the server
2) It is not possible to connect to the db on the server using applets
So what you can do is to get your applet connected to your servlet using streams. Send the file over to the servlet. The servlet would then insert a record into the db and save the file into the appropriate directory. This way, there is no need to change or set any security/permissions at all
Regards,
Leon If you need additional help, you can email to me at zaoliang@hotmail.com I don't guaranty that I will be able to solve your problems but I will try my best
I might be wrong in the previous post as in to that you do not have to set/change any security/permissions because no matter how, your applet still have to access your local pc's files in order to send them over to the servlet.
I have not actually done this before (sending of files) but it should be able to work since you are able to set the type of data transfer for the connection between the applet and servlet.
You might have to do more research on this part
Regards,
Leon If you need additional help, you can email to me at zaoliang@hotmail.com I don't guaranty that I will be able to solve your problems but I will try my best
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.