Put the applet in its own jar, index it (jar -i), and add a manifest
such that classes will only load from the jar. Sign the jar. All
standard jar stuff; see man jar. Put the jar with your html (WEB-INF
is a really bad idea).
If blocking decompilation is essential, build a custom classloader
that knows how to decrypt encrypted classes. This isn't hard. Contact
me for mine.
The hard part is key management. Where to hide them in an environment
where there's nobody to trust?
See http://virtualschool.edu/jwaa for the server side stuff.
At 6:35 PM +0200 7/29/01, Michael Weller wrote:
>hi Pierre-Yves,
>
>thanks for ur reply, I thought that before but didn't believe it, I meant it
>must be possible because I wanted my applet and my servlets to share some
>classes and for that reason putting them together under WEB-INF/classes|/lib
>would have been great...
>I also realized that the user will get the classes no matter what I do,
>because JVM needs the classes to execute the applet and so he probably could
>locate them in his browser's cache anyway.
>I don't want to use WEbStart because the users would have to download
>WebStart, I didn't use swing as well, because I don't want to loose users
>because they don't want to download the plug-in, so I set on the browser's
>built-in java support.
>
>-mw
>
>----- Original Message -----
>From: "Pierre-Yves Saumont" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Sunday, July 29, 2001 5:36 PM
>Subject: Re: applet in webapplication
>
>
>> Hi, Michael,
>>
>> Depending on the container you are using, you will probabbly not be
>allowed
>> to access the web-inf/classes subdirectory through HTTP. But why would you
>> want to put your applet classes there? You applet ressources (classes and
>> other ressources) should be bundled in a jar file. This jar file should go
>> in a subdirectory of your application document root directory.
>>
>> Anyway, you wont be able to prevent your users to download the applet
>> classes directly. (But why should you care?) If you want to prevent this,
>> you should have a look at Java WebStart, which will allow you to
>> auutomatically download your client application to you authorized users
>> through a web browser. This way, you can use an application instead of an
>> applet, and still deploy it through Web access.
>>
>> Pierre-Yves
>>
>> -----Message d'origine-----
>> De : A mailing list for discussion about Sun Microsystem's Java Servlet
>> API Technology. [mailto:[EMAIL PROTECTED]]De la part de
>> Michael Weller
>> Envoy� : dimanche 29 juillet 2001 14:14
>> � : [EMAIL PROTECTED]
>> Objet : applet in webapplication
>>
>>
>> hi everybody,
>> this is kind of off-topic because this qeustion has nothing to do with
>> servlets directly, but with webapplications. I didn't find a list
>> spezialized to webapplications, searched the archives, google, jguru,
>> jars,... even asked at hotdispatch.com , so I thought I ask here.
>>
>> I wrote a webapplication where i use servlets to display the data for
>normal
>> users, and I want to use an Applet to enable authorized users to change
>the
>> data...
>> Everything works wonderful: I wrote a java application which does all
>that,
>> and now i converted it to an applet and try do deploy it in my
>> webapplication.
>> I can get the applet (main class: maw.jgr.config.ConfigApplet) running by
>> putting its class files into <server's
>> webapp-dir>/jgr/maw/jgr/config/ConfigApplet.class and in my html documents
>I
>> set codebase to . or .. or http://myHost/jgr . The first problem with this
>> is that the user could download the class file directly by typing
>> http://myHost/jgr/maw/jgr/config/ConfigApplet.class, but the second
>problem
>> (even worse) is that I have to copy all classes my applet needs from my
>> <server's webapp-dir>/jgr/WEB-INF/classes/... directory (where all
>servlets
>> and stuff is at) to <server's webapp-dir>/jgr/maw/jgr/ i.e. where the
> > applet is saved in...
>> My question is: How do I need to set the codebase in my html documents if
>I
>> chose to save my class files in <server's
>> webapp-dir>/jgr/WEB-INF/classes/... ?
>>
>> Thanks for your help in advance!
>>
>> Michael Weller
>>
>>
>___________________________________________________________________________
>> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
>body
>> of the message "signoff SERVLET-INTEREST".
>>
>> Archives: http://archives.java.sun.com/archives/servlet-interest.html
>> Resources: http://java.sun.com/products/servlet/external-resources.html
>> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>>
>>
>___________________________________________________________________________
>> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
>body
>> of the message "signoff SERVLET-INTEREST".
>>
>> Archives: http://archives.java.sun.com/archives/servlet-interest.html
>> Resources: http://java.sun.com/products/servlet/external-resources.html
>> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>>
>>
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
--
For industrial age goods there were checks and credit cards.
For everything else there is mybank.dom at http://virtualschool.edu/mybank
Brad Cox, PhD; [EMAIL PROTECTED] 703 361 4751
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html