tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boniakowski,Jeb" <JBoniakow...@nntllc.com>
Subject RE: Tomcat's classes dir is not in the internal classpath
Date Tue, 01 Aug 2000 17:28:39 GMT
WEB-INF is a special directory.  The stuff in their is only supposed to be
used by the server (servlets, classes that servlets use, etc.).  One of the
guarantees of WEB-INF is that stuff in it can't get sent to the client.

When you put an applet tag in an HTML page, the browser (or appletviewer),
asks the server for that applet code.  In this case, the code is being run
on the client, so it has to get sent down the pipe to the client.  They need
access to this.  It can't be in WEB-INF.  It should probably be in docRoot.

I don't understand what you are trying to do, though, in preventing clients
from accessing it directly.  Do you want to make sure they are logged in or
something?  You could set up a directory for protected resources and enforce
BASIC http authentication for accessing that directory.

Fundamentally, though, a browser needs to access an applet.

jeb.

ps - sorry about the HTML thing.  I keep checking off "plaintext" in outlook
but it comes out HTML.





> -----Original Message-----
> From: Holger Wiechert [mailto:Holger.Wiechert@coconet.de]
> Sent: Tuesday, August 01, 2000 1:09 PM
> To: 'tomcat-user@jakarta.apache.org'
> Subject: Tomcat's classes dir is not in the internal classpath
> 
> 
> Hi,
> 
> I've got a problem with a simple thing on tomcat.
> 
> My problem is, that I don't know how to place the class 
> file(s) so that they
> don't get 
> accessed via a client (browser). So, I don't want to put them 
> in the root of
> my application
> (here "sillyapplet", see below).
> According to the doc on deployment
> (<TOMCAT_HOME>\doc\appdev\deployment.html),
> the folders "WEB-INF/classes" and "WEB-INF/lib" are 
> automatically added to
> the classpath 
> of my application.
> 
> The directory and file structure of my simple "web 
> application" on tomcat is
> as follows:
> 
> 
> -
>  |
>  webapps 
>         |
> 	sillyapplet (index.html)
>                    |
> 		   WEB-INF
> 			  |
> 			   classes (MyApplet.class)
> 			   lib 
> 
> 
> The HTML-File (index.html) is quite simple:
> 
> <html>
> <head>
> <title>Silly applet </title>
> </head>
> <body>
> <h1><font face="Arial">Here's just a silly applet...</font></h1>
> <p><applet code="MyApplet.class" width="200" 
> height="100"></applet></p>
> </body>
> </html>
> 
> 
> The applet (MyApplet.class) is only found when placed in the 
> app root (in
> "sillyapplet") 
> but not when placed in the "WEB-INF/classes" directory.
> 
> But doing so, anybody can access it via
> 
> http://www.sillydomain.com/sillyapplet/MyApplet.class
> 
> Does anybody know, how to configure tomcat in order to place it in the
> classes dir?
> 
> I'm using NT4, SP5, JDK1.3, MSIE5.
> 
> Thanks in advance, 
> 
> Holger
> 

Mime
View raw message