Security for applets files inside a folder

Friends

I have a directory structure /a/b/c/applets/ This directory has .java, .class and other applet files. I gave the applets folder 755 permission because these applets are displayed at different web pages of a portal.

Now I want to restrict the visibility of all the files in this applets folder only for logged in users. As of now, when I hit the URL directly something like http://mydomain/applets/someFilename.java the code is visible which is security vulnerable. Any advice on how to implement this?

I am on Solaris and moderators please feel free to move the thread if its not relevant to this section. Thanks!

---------- Post updated 11-23-10 at 10:23 AM ---------- Previous update was 11-22-10 at 12:24 PM ----------

Any guidance guys?