Since case is supposed to be significant, this would appear
to be a bug in the java compiler as the index_1.java file
is generated correctly.  However, expecting package "X" and
package "x" to be distinguishable on a case insensitive OS
may be expecting too much.  Is there a reason the two
"x" directories have to be a different case?

Note that this would not be a problem in Tomcat 4.x since
"org.apache.jsp" is always included in the package name.
I will look as what can be done to provide a "package
prefix" in Tomcat 3.3.x.  Not sure if it will make it in
3.3.1.

Cheers,
Larry

> -----Original Message-----
> From: Romain Slootmaekers [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 07, 2002 3:49 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Moving to windows from linux ? bug ? -> DEMO
> 
> 
> a follow up for those that wanna see it for themselves.
> 
> I attached a nano-web app that shows the exact problem.
> (extracting and installing, you have to do yourself,
>  you'll also have to modify the bug.xml for your system)
> 
> I tried this with
>   Win98:
> 
>   -)tomcat 3.3.1-rc1 on Windows 98 with the ibm 1.3 jdk and jikes.
>     gives the problem described below.
>     
>   -)tomcat 3.3.1-rc1 on Windows 98 with sun's jdk1.4 and its compiler
>     same problem, plus warnings that the way tomcat fires up 
> the compiler
>     is deprecated.
> 
>   -)tomcat 3.2.1 on Windows 98 widh sun's and ibm's jds 1.4 and 1.3
>     same problem
> 
>   Linux:
>   -)tomcat 3.3.1-rc1 on Linux Mandrake 8.1 with ibm 1.3 jdk and jikes
>     runs perfectly
> 
>   -)tomcat 3.2.1 on Linux Suse 7.0 with ibm 1.3 and its compiler
>     runs perfectly
> 
> Sorry, that's all I could get my hands on for now...
> 
> 
> the problem is the generated Java file .../X/index_1.java 
> included below:
> like I said the package X ... import x.* combination makes 
> the compilers
> go berserk.
> 
> ------------------------------- code 
> -----------------------------------
> package X;
> 
> import javax.servlet.*;
> import javax.servlet.http.*;
> import javax.servlet.jsp.*;
> import x.*;
> 
> 
> public class index_1 extends org.apache.jasper.runtime.HttpJspBase {
> 
> 
>     static {
>     }
>     public index_1( ) {
>     }
> 
>     private boolean _jspx_inited = false;
> 
>     public final synchronized void _jspx_init() throws
> org.apache.jasper.JasperException {
>         if (! _jspx_inited) {
>             _jspx_inited = true;
>         }
>     }
> 
>     public void _jspService(HttpServletRequest request,
> HttpServletResponse  response)
>         throws java.io.IOException, ServletException {
> 
>         JspFactory _jspxFactory = null;
>         PageContext pageContext = null;
>         HttpSession session = null;
>         ServletContext application = null;
>         ServletConfig config = null;
>         JspWriter out = null;
>         Object page = this;
>         String  _value = null;
>         try {
>             try {
> 
>                 _jspx_init();
>                 _jspxFactory = JspFactory.getDefaultFactory();
>                 
> response.setContentType("text/html;charset=ISO-8859-1");
>                 pageContext = 
> _jspxFactory.getPageContext(this, request,
> response,
>                                       "", true, 8192, true);
> 
>                 application = pageContext.getServletContext();
>                 config = pageContext.getServletConfig();
>                 session = pageContext.getSession();
>                 out = pageContext.getOut();
> 
>                 // HTML // begin
> [file="D:\\tmp\\BUG\\X\\index.jsp";from=(0,40);to=(1,0)]
>                     out.write("\r\n");
> 
>                 // end
>                 // begin
> [file="D:\\tmp\\BUG\\X\\index.jsp";from=(1,2);to=(3,0)]
>                      X myX=new X();
>                        out.println(myX);
>                 // end
> 
>             } catch (Exception ex) {
>                 if (out != null && out.getBufferSize() != 0)
>                     out.clearBuffer();
>                 if (pageContext !=
> null) pageContext.handlePageException(ex);
>             } catch (Error error) {
>                 throw error;
>             } catch (Throwable throwable) {
>                 throw new ServletException(throwable);
>             }
>         } finally {
>             if (out instanceof 
> org.apache.jasper.runtime.JspWriterImpl) { 
> 
> ((org.apache.jasper.runtime.JspWriterImpl)out).flushBuffer();
>             }
>             if (_jspxFactory !=
> null) _jspxFactory.releasePageContext(pageContext);
>         }
>     }
> }
> 
> ----------------------------end of 
> code-----------------------------------
> 
> I hope this clearly demonstrates the problem, and I think it really
> is a bug. the problem is : is it a compiler of tomcat bug ?
> and more important how do I work around this problem...
> 
> 
> have fun,
> 
> 
> Sloot.
> 
> 
> 
> 
> 
> On Thu, 7 Mar 2002, Romain Slootmaekers wrote:
> 
> > Yo,
> > 
> > I'm moving from linux to windows  (yeah, yeah I know  :( )
> > 
> > On the linux platform, our web application runs PERFECTLY
> > but on windows we have problems when the jsp pages are compiled.
> > 
> > appearantly, tomcat doesn't like the following situation.
> >  file : /PROBLEM/abc.jsp
> >          <%@ page language="java" import="xxx.*" %>
> >          <% SomeClass x=new SomeClass();
> >             // class really exists in package xxx
> >             // and was compiled with the same compiler.
> >           %>
> > 
> >  it gives following error:
> > 
> > org.apache.jasper.JasperException: Unable to compile 
> > Found 2 semantic errors compiling
> > ".../XXX/abc_1.java":
> > 
> >       SomeClass  x=new SomeClass();
> >       <------->
> > *** Error: The type "SomeClass" was found in package
> > "XXX". However, that type is associated with another named package,
> > "xxx".
> > 
> > I guess the compiler gets confused with the cases on 
> windows, because 
> > he has both an XXX and xxx package in the classpath.
> > 
> > Is this a bug ? or is this 'known/specified behaviour' and what do I
> > do about it ?
> > 
> > TIA,
> > 
> > Sloot.
> > 
> > 
> 

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to