File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes CopyPaste in applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "CopyPaste in applet" Watch "CopyPaste in applet" New topic
Author

CopyPaste in applet

Ian Budd
Greenhorn

Joined: Aug 06, 2010
Posts: 1
Hi all,
I decided to write an applet as I run a technical challenge/puzzle site and wanted to create a tool to help users along the way. You can view the work in progress here:
http://sabrefilms.co.uk/store/app.php
I am aware however that since java 6 update 24, copy/paste to/from applets to the main system clipboard has been disabled due to security measures, which is understandable.
I have considered signing the applet to create a policy file allowing clipboard access, however I would prefer it if the user wouldn't have to go through the process of verifying a signed applet (My regular users trust the site anyway but that isnt the point ;) )

I thought about creating a HTML field where the user can enter their string, have this saved to a temporary plaintext on the server, then read in by the applet, doing the same in reverse for output, but this would require an extra step for the user to import/export data.

Do you have any suggestions you can offer around this? Is a signed applet really the way to go?

Many thanks.
Ian
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
If you're amenable to using an HTML text field for this, then Java can access those through the Common DOM API (see the section "Contact the DOM"). The applet need not be signed to do this.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CopyPaste in applet