File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Application Development Structure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Application Development Structure" Watch "Application Development Structure" New topic

Application Development Structure

Bharat Shah

Joined: Apr 21, 2002
Posts: 7
I am trying to create standard way of storing software objects when using servlets and applets.

When I use the following structure, things work o.k. in that, my applet will be successfully loaded, which in turn calls the servlet successfully:
[my execution call is http://localhost:8080/myapplications/temp (index.html calls callapplet.html)].

HOWEVER, when I move the applet.class file down to temp under WEB-INF, it does not work. I tried various combinations of CODEBASE parameters in the callapplet.html file, but maybe I am missing something - the applet just does not get loaded.

Is there a solution that I am missing or is this a limitation that one has to live with? The reason I am wanting to move the applet.class file down under WEB-INF/classes/temp is to keep all the class files in one place.

Is there an alternative arrangement of directory structure?

Thanks in advance.

[BSouther Edit: added code tags]
[ April 18, 2006: Message edited by: Ben Souther ]
Rodrigo Alvarez
Ranch Hand

Joined: Apr 10, 2006
Posts: 75

Anything you put under the WEB-INF directory will not be directly accessible to the end user, you can only put there "helper-stuff" like your server side classes, libs,...

I guess that an applet needs to be directly available to the end user because, from the server point of view, this is just file that the user agent wants to download. As far as the server is concerned, there is nothing special in the fact that the browser will then execute it. So the root of the web app sounds like a correct place, although I agree it looks messy.

Maybe is there a way to map a ressource from some WEB-INF/applet-ressources/ directory to a public name thanks to the DD ?

It is a mistake to think you can solve any major problems just with potatoes.<br />--Douglas Adams
I agree. Here's the link:
subject: Application Development Structure
It's not a secret anymore!