Nope, they can all be in the package.  Just include the package line at the
top of each of your class files, then you have two choices.  You can either
create the directory structure under the servlets directory (in your case
com/ml/servlet) and put your class files there, or create a jar file and
read up on how your servlet engine references jar files.  Remember, when you
set up the servlet name in your servlet engine, you'll need to specify the
full name of the class (i.e. com.ml.servlet.BigServlet).
    (*Chris*)

----- Original Message -----
From: Ashby, Paul (London) <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 16, 1999 1:28 AM
Subject: Packages


> I have written my servlet that cointains a number of classfiles.  So far I
> have just copied the lot into the /servlet dir on the web server.  I would
> like to package the classes into a package called com.ml.servlet.
>
> Am I correct in thinking that the top level class cannot be in  the
package
> (the one derived from HttpSrervlet) since that needs to go directly into
the
> servlet directory - whereas I can package all the other files and then
> iomport com.ml.servlet into the main class.
>
> Ideally I would like to put all of the classes into a single package but I
> haven't managed to get this to work
>
> Any advice appreciated
>
> _______________
> Paul Ashby
> Merrill Lynch, London
> +44 (0)171 867 4025
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to