This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Where to Put Applet Classes or JAR File? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Where to Put Applet Classes or JAR File?" Watch "Where to Put Applet Classes or JAR File?" New topic

Where to Put Applet Classes or JAR File?

Edmund Yong
Ranch Hand

Joined: Nov 16, 2003
Posts: 164
In a web application, classes are put under WEB-INF/classes and JAR files are put under WEB-INF/lib. These files cannot be directly accessed by the client. But what about applet classes, or a JAR file that contain classes for the applet? Where should they be put?

Thanks in advance.

SCJP 1.2, SCWCD 1.4
Daniel Rhoades
Ranch Hand

Joined: Jun 30, 2004
Posts: 186
Any sub-dir of your web root except web-inf and meta-inf, they don't need to be in a package tree either

Drinking more tea is the key...
Sergey Tyulkin
Ranch Hand

Joined: May 10, 2005
Posts: 87
Of course, they should be accessible by the client, as the browser will need to GET them.
And there is nothing wrong to put them in accessible directory, as it was intended, isn't it?

Joined: Apr 12, 2005
Posts: 23

i think you can put it anywhere because it is run from the client, so you don't need to protect it.

Buhay Estudyante
amit taneja
Ranch Hand

Joined: Mar 14, 2003
Posts: 812
whats wrong if we put it in web-inf directory as there is link of applet from the jsp/servelt and the applet is not going to be called directly..

so i know that we can't access the files under web-inf directly..

pls confirm me

Thanks and Regards, Amit Taneja
Edmund Yong
Ranch Hand

Joined: Nov 16, 2003
Posts: 164
Thanks guys for your replies.

Contrary to what amit said, I don't think we can put the applet files in WEB-INF. Unlike servlet classes, the applet classes have be transmitted over to the client side to run. If you put the applet classes in WEB-INF, then the server will prevent them from being transmitted over to the client side.
Have you checked out Aspose?
subject: Where to Put Applet Classes or JAR File?
jQuery in Action, 3rd edition