Hi Allistair, I've tried your example too, and it indeed works!?!?
I've filed a bug in the ASF bugzilla providing a test-case, it's bug 39093. Tanx for your time! Regards, Paul Hamer management & development [EMAIL PROTECTED] toHAVE websolutions www.tohave.nl [EMAIL PROTECTED] -----Original Message----- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Thursday, 23 March 2006 15:50 To: Tomcat Users List Subject: RE: Tomcat 5.5.16 Bug? messes up when a class has the same name as a package Except it doesn't :) It works for me. <% com.Qas qas1 = new com.Qas(); com.qas.Qas qas2 = new com.qas.Qas(); out.println(qas1.test()); out.println(qas2.test()); %> I think it's your JAR. Rename your JAR to .ZIP and examine how its packaged the classes. Allistair. -----Original Message----- From: Paul Hamer [mailto:[EMAIL PROTECTED] Sent: 23 March 2006 14:43 To: 'Tomcat Users List' Subject: RE: Tomcat 5.5.16 Bug? messes up when a class has the same name as a package Hi Allistair, You're missing one vital part :-) You've got only 1 class: com.qas.Qas The problem should occur when you add a second class called: com.Qas Now try com.qas.Qas qas = new com.qas.Qas(); in your JSP again. Regards, Paul Hamer management & development [EMAIL PROTECTED] toHAVE websolutions www.tohave.nl [EMAIL PROTECTED] -----Original Message----- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Thursday, 23 March 2006 14:52 To: Tomcat Users List Subject: RE: Tomcat 5.5.16 Bug? messes up when a class has the same name as a package I cannot reproduce this issue in 5.5.16 I created a class qas at com.qas Resulting in a fully qualified class name of com.qas.qas Which in a JSP I instantiated with com.qas.qas qas = new com.qas.qas(); No issue. I then refactored to com.qas.Qas And re-tested again without issue. Perhaps the issue exibits itself when the classes are packed into a JAR. How did you create your JAR? Allistair. -----Original Message----- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: 23 March 2006 13:29 To: Tomcat Users List Subject: RE: Tomcat 5.5.16 Bug? messes up when a class has the same name as a package Tomcat is just adhering to the Sun Java specification naming conventions. Packages should be lowercase. If Eclipse allows it, it's being "nice" to you in the same way that IE is "nice" about rendering invalid HTML. It's better Tomcat forces you to correct your bad naming conventions than encouraging it. Cheers, Allistair. -----Original Message----- From: Paul Hamer [mailto:[EMAIL PROTECTED] Sent: 23 March 2006 13:24 To: 'Tomcat Users List' Subject: RE: Tomcat 5.5.16 Bug? messes up when a class has the same name as a package Hi again, Just checked: the same problem occurs with Tomcat 5.5.15. Regards, Paul Hamer management & development [EMAIL PROTECTED] toHAVE websolutions www.tohave.nl [EMAIL PROTECTED] -----Original Message----- From: Paul Hamer [mailto:[EMAIL PROTECTED] Sent: Thursday, 23 March 2006 13:59 To: users@tomcat.apache.org Subject: Tomcat 5.5.16 Bug? messes up when a class has the same name as a package Hi, I just updated to Tomcat 5.5.16 about 2 days after it was released. Yesterday I walked into what seems to be a bug. I'm not sure whether Tomcat 5.5.15 had this problem as well. I am sure, however, that Tomcat 4.0.6 did *not* have this problem. I've got the following class/package structure: 1: nl.hhv.merlin.gui.editor.EditButtons 2: nl.hhv.merlin.gui.Editor 3: nl.hhv.merlin.gui.editor2.EditButtons Note that packagename of the first class is equal to the fully qualified name of the second class (except for caps/nocaps). This should be no problem right?!? At least it never was until now. Now I have a JSP that simply does: <% nl.hhv.merlin.gui.editor.EditButtons buttons = null; %> Eclipse has no problems with this JSP, and happily accepts it, why shouldn't it? Looks fine to me to :-) But Tomcat 5.5.16 gives me the following error: Generated servlet error: nl.hhv.merlin.gui.editor cannot be resolved to a type When I change my JSP to: <% nl.hhv.merlin.gui.editor2.EditButtons buttons = null; %> Tomcat compiles the JSP without any problems. Note that the 2nd EditButtons class is an EXACT copy of the first. All three classes are zipped into the same jar, so it's not a classpath issue. Any thoughts on this? Regards, Paul Hamer management & development [EMAIL PROTECTED] toHAVE websolutions www.tohave.nl [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> ------------------------------------------------------- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 ------------------------------------------------------- </FONT> <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLACK> Disclaimer: The information contained within this e-mail is confidential and may be privileged. This email is intended solely for the named recipient only; if you are not authorised you must not disclose, copy, distribute, or retain this message or any part of it. If you have received this message in error please contact the sender at once so that we may take the appropriate action and avoid troubling you further. Any views expressed in this message are those of the individual sender. QAS Limited has the right lawfully to record, monitor and inspect messages between its employees and any third party. Your messages shall be subject to such lawful supervision as QAS Limited deems to be necessary in order to protect its information, its interests and its reputation. Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS Limited cannot guarantee that attachments are virus free or compatible with your systems and does not accept any liability in respect of viruses or computer problems experienced. </FONT> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]