Solved

saving a file by applet?

Posted on 2001-06-28
8
344 Views
Last Modified: 2013-11-23
Hi,
i m making an applet, which download a file nd then save it on disk...
Now is there any way of saving file through applet.
plz send practical answers.
wbw
kaspak
0
Comment
Question by:kaspak
8 Comments
 
LVL 15

Expert Comment

by:mohan_sekar
ID: 6237339
Hi,

     U have to use signed applet to do so.

bye
0
 
LVL 7

Accepted Solution

by:
Ravindra76 earned 35 total points
ID: 6237963

Signing applets :-

http://www.ddj.com/articles/1999/9902/9902h/9902h.htm 
http://java.sun.com/security/signExample/index.html 
http://java.sun.com/docs/books/tutorial/applet/overview/security.html 

Code signing resources:

Creating Signed, Persistent Java Applets
http://www.ddj.com/articles/1999/9902/9902h/9902h.htm 

http://www.javasoft.com/products/jdk/1.1/docs/guide/security/index.html 
http://java.sun.com/security/signExample/index.html 
http://www.verisign.com/library/guide/developer/signing/index.html 
http://www.suitable.com/Doc_CodeSigning.shtml 
http://www.securingjava.com/appdx-c/ 
http://tactika.com/realhome/javaht/java-s1.html 
http://www.fastlane.net/~tlandry/javafaq.txt 

IE:
http://www.thawte.com/support/developer/ms.html 
http://www.developer.com/journal/techworkshop/curr.html 
http://www.verisign.com/library/guide/developer/authenticode/index.html 
http://msdn.microsoft.com/library/psdk/crypto/cryptotools_6cdv.htm 
http://msdn.microsoft.com/library/psdk/crypto/portaltool_3u3p.htm 

NN:
http://developer.netscape.com/docs/manuals/signedobj/ 
http://developer.netscape.com/docs/manuals/signedobj/javadoc/Package-netscape_security.html 
http://developer.netscape.com/docs/manuals/signedobj/targets/contents.htm 
http://developer.netscape.com/support/faqs/objfaq.html 
http://developer.netscape.com/docs/manuals/deploymt/4_5PREFS.HTM 

NN: Bypass the need for a certificate
Netscape provides a way to accept a codebase as trusted (then a certificate is not needed). This can be useful during development or in a private Intranet. In the Netscape Users directory, there is a file called prefs.js. Adding the line user_pref("signed.applets.codebase_principal_support", true);

will enable JAR file without a certificate to request privileges on your machine. If you agree, it will be possible for an Applet to lauch a program, write a file on your hard disk or print on the printer. You will still have to ask for privileges in your program using the Netscape capabilites classes.
Another way is to lower general security setting to more allow more freedom when running applets locally. Add or modify the following entries in the prefs.js: user_pref("unsigned.applets.low_security_for_local_classes", true);
user_pref("signed.applets.local_classes_have_30_powers", true);
user_pref("signed.applets.low_security_for_local_classes", true);
user_pref("signed.applets.verbose_security_exception", true);


Then you don't need to asked for privileges for local classes.
When adding or modifying the file prefs.js, Netscape must not be running because your modification will be overwritten. So shut down Netscape, edit the prefs.js and then restart Netscape.


Running signed applets with the JavaTM Plug-in
http://www.suitable.com/CodeSigningSignPlug.shtml 
http://java.sun.com/security/signExample/index.html 

http://www.javasoft.com/products/jdk/1.1/docs/guide/security/index.html 

DEPLOYING RSA SIGNED APPLETS IN JAVA TM PLUG-IN 1.2.2
http://java.sun.com/products/plugin/1.2/docs/nsobjsigning.html 
http://java.sun.com/docs/books/tutorial/security1.2/toolsign/index.html 


import netscape.security.*;

PrivilegeManager.grantPrivileges("UniversalConnect");
PrivilegeManager.grantPrivileges("UniversaLinkAccess");
try
 {
 // load Oracle-JDBC-driver
 Class.forName ("oracle.jdbc.driver.OracleDriver");
 }
 catch (Exception e)
 {
g.drawString("No able to load JDBC driver",300,300);
return;
 }
Courtesy: vladi21
0
 
LVL 9

Expert Comment

by:yongsing
ID: 6240286
I have asked this question before. ravindra76, you provided so many links. Some of the articles seem quite old (more than two years). I don't even know which one I should really follow. Is there a 'standard' or popular method of signing applets?
0
 
LVL 7

Expert Comment

by:Ravindra76
ID: 6243697
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 7

Expert Comment

by:Ravindra76
ID: 6243719
First three are best
0
 

Author Comment

by:kaspak
ID: 6255560
hi,
ravindra76,
I have got the solution, now files r saving at my desired location.
I used ServletContext.getRealPath() to obtain absolute path on server of my application,
which i then use in MultipartRequest class
ne way thanks for good correspondence
kaspak
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6892833
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> You cannot delete a question with comments, special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process for further information, if needed.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.  Anytime you have questions which are LOCKED with a Proposed Answer but does not serve your needs, please reject it and add comments as to why.  In addition, when you do grade the question, if the grade is less than an A, please add a comment as to why.  This helps all involved, as well as future persons who may access this item in the future to seek help.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20138432.html
http://www.experts-exchange.com/questions/Q.20143168.html
http://www.experts-exchange.com/questions/Q.20144984.html
http://www.experts-exchange.com/questions/Q.20147636.html
http://www.experts-exchange.com/questions/Q.20152602.html
http://www.experts-exchange.com/questions/Q.20155302.html
http://www.experts-exchange.com/questions/Q.20163216.html
http://www.experts-exchange.com/questions/Q.20163219.html
http://www.experts-exchange.com/questions/Q.20197446.html
http://www.experts-exchange.com/questions/Q.20276776.html




PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643

Moderators will finalize this question if still open in 7 days, by either moving this to the PAQ (Previously Asked Questions) at zero points, deleting it or awarding expert(s) when recommendations are made, or an independent determination can be made.  Expert input is always appreciated to determine the fair outcome.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
0
 
LVL 1

Expert Comment

by:Computer101
ID: 6973853
Comment from expert accepted as answer.

Computer101
E-E Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now