On Mon, 19 Aug 2002, [gb2312] Yunfeng Hou wrote:

> Date: Mon, 19 Aug 2002 11:35:17 +0800 (CST)
> From: "[gb2312] Yunfeng Hou" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Developers List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: jasper package
>
> Jasper has command line option to set package name,
> but not true for JspServlet, I made some change to
> give user a chance to set the packageName in the
> servlet init parameter.
>

Personally, I think supporting this at all is a *really* bad idea ... the
JSP spec is very clear that the container is free to put the generated
classes in whatever package it wants to (even different ones for different
pages), so it seems very counter-productive to allow a user to tie
themselves to a particular version of the JSP page compiler on a
particular container that happens to implement this kind of option.

A desire to do this in the first place probably comes from wanting to use
unpackaged classes without importing them -- which is both against the JSP
spec and is also frowned on in general by the Java compiler in JDK 1.4 and
later.  You're MUCH better off putting your classes into packages and
explicitly importing them.

Craig McClanahan


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to