For the command line compiler, I've found it very useful. It specifies the
base package for the compiled jsp pages. By matching that with the directory
that the pages are output into, I can then point an ant javac task at them
and validate that everything compiles correctly, as part of an automated
build.

That is, /index.jsp would go into
${output}/com/netfolio/compiled_jsp/index.java, and /dir/index.jsp would go
into ${output}/com/netfolio/compiled_jsp/dir/index.java. So compiling them
is just a matter of a plain compile of the ${output} directory.

When JspC is working, that is. Haven't checked recently, but it's been
broken as often as not.

The runtime jsp compiler produces, or used to produce, java files that
aren't suitable for compiling as a batch. The package didn't match up with
the directory name. It simplified class reloading, IIRC, though.


> -----Original Message-----
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 19, 2002 6:11 PM
> To: Tomcat Developers List
> Subject: Re: jasper package
>
>
>
>
> 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]>
>
>
>


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

Reply via email to