Re: Class files for jsp

From: Raymond DeCampo (rdecampo_at_spam-I-am-not.twcny.rr.com)
Date: 12/19/03


Date: Thu, 18 Dec 2003 23:18:56 GMT

Harold Ensle wrote:
>
>
> Thanks. This was very informative. Using public worked. However, when
> I used the class from a compiled servlet, it worked without "public" and
> that
> is why I didn't think it was needed. Apparently the compiler had public as
> the default.
>

It is unlikely that the compiler "had public as the default." That
would violate the Java Language specification. More likely was that the
servlet was in the same package as the other class. (Probably both were
in the "default" package that classes without a package directive are
placed in.) That would give it access to anything declared without an
explicit access modifier.

Ray



Relevant Pages

  • Re: Freeware download corrupt (?)
    ... > a list of all functions in a package that fall in that category. ... > conflict with a function of that name in a future version of the CRTL. ... > But the compiler doesn't do that, so for now we're on our own. ... I create a package with a routine in it called "highwater". ...
    (comp.os.vms)
  • Re: PL/I, COBOL, Advantages, Equivalence, et al
    ... SPARK will allow a variable to have a value that conforms ... might be that a package somewhere will look like this ... An Ada compiler may issue a warning; ... LC> Ada/SPARK support a boolean type? ...
    (comp.lang.pl1)
  • Re: How to use packages?
    ... libraries in assembly could be created and imported for use. ... package so that some very cool libraries could be created in ways that I ... This would be very wrong -- basically giving away a Lisp compiler ... For example (given the name as.exe for the assembler): ...
    (comp.lang.lisp)
  • RE: Visual studio 2003 .NET versus its own Command Prompt
    ... > package in the lab. ... > command line compiler which cames with it. ... library, which is a .lib file, for it to know where in the DLL the functions ...
    (microsoft.public.vc.language)
  • Re: Frage zu Packages und our
    ... Der Compiler selbst schaut jedoch bei einem unqualifizierten ... Laufzeit tatsächlich auf die globale (Package) Variable zugegriffen. ... von "my" ident sind - denn ein innerhalb eines Scopes deklariertes ...
    (de.comp.lang.perl.misc)