Two Laptop Bag
The moose likes Applets and the fly likes accessing applet outside the wwwroot Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "accessing applet outside the wwwroot" Watch "accessing applet outside the wwwroot" New topic

accessing applet outside the wwwroot

Mike Kowalski

Joined: Apr 21, 2013
Posts: 6
At first i would like to apologize for my english.
I have put my applet outside wwwroot to a directory called APPLET to prevent hotlinking and now i'm having some accessing problems.

I have no idea how should i modify my codebase path. Could you please tell me what i am doing wrong? Everything was working perfectly fine when my applet was inside the wwwroot (my previusly codebase was APPLET/classes).

This is how now i am building my applet object:

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63858

If the applet isn't available as part of the web app, how is supposed to be downloaded to the client?

The browser has no access (thank goodness) to other folders such as /users/user_name/APPLET/classes. Could you imagine the security nightmare if it could?

[Asking smart questions] [About Bear] [Books by Bear]
Mike Kowalski

Joined: Apr 21, 2013
Posts: 6
Ohh i see.
I have an access to php scripts outside the wwwroot so i thought there is a way to get an access to java applet but i guess they are handle in different way. Is this is because they are client side?
Is there a different way to secure my applet to prevent hotlinking? My application is running on Apache HTTP Server.

Sorry for my newbie questions and thank you very much for your time.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
The HTML will always be accessible if someone guesses the URL. If you want to require authenticated access you can set up HTTP Basic Authentication for that page, or require a login within the applet.
I agree. Here's the link:
subject: accessing applet outside the wwwroot
It's not a secret anymore!