The -webapp option
for JspC is somewhat broken. The compiler does not put out java files into
distinct directories, so each file with the same name will overwrite any other
file with the same name, e.g. index.jsp. The servlet classes are also not
put into a named package. And, at least under Windows, it has some trouble
correlating the base URI of the webapp with the URI paths of the jsp
files.
There is also a lot
of existing hacking to accomodate Windows '\' directory separator character.
Classic do/undo/redo accomodation.
This is mostly a
semantic mistake. The only classes that deal with filesystem paths should have
to deal with File.separator. URL's never use anything other than '/' as a
separator. [<pedantic>technically, a URI could use a '\', but only for
some scheme other than http <pendantic />] That means that if
File.toString() is used, it should be converted immediately with
replace(File.separatorChar, '/'). Methods like ctxt.getRealPath should be
entitled to assume that what they are being passed is a valid part of an URL.
The package name fix
in CommandLineContext relies on the fix in JspC. The uribase that JspC
assembles, based on searching for the WEB-INF directory, had multiple slashes in
the path, eg "/examples//jsp//. That was from this line:
tUriBase = "/" + f.getName() + "/" +
tUriBase;
tUriBase always has
a leading '/'.
This patch doesn't
address the bug that JspC can't find tag library descriptors. I'm looking at
that now.
<><><><><><><><><><><><><><><><><><><><><>This electronic mail transmission may contain confidential information and is intended only for the person(s) named. Any use, copying or disclosure by any other person is strictly prohibited. If you have received this transmission in error, please notify the sender via e-mail. <><><><><><><><><><><><><><><><><><><><><>