----------
From: "Craig R. McClanahan" cmcclanahan@mytownnet.com
To: Java Apache Servlet List java-apache@list.working-dogs.com
Subject: Re: Potential Bug - Case Sensitivity
Date: Wed, Jun 9, 1999, 1:29 PM
Michael Prescott wrote:
> I have a strange situation occurring (it's not a problem for me, but a
> colleague suggested I mention it here). If I misspell the URL to my
> servlet, as expected, I get a 404 error. But if I get the case wrong, as
> in:
>
> http://localhost/servlet/Simpleservlet
>
> I get a 500 Internal Server Error, and my jserv.log contains:
>
> [09/06/1999 15:44:39:544 EDT] java.lang.ClassFormatError: Wrong name
> at java.lang.ClassLoader.defineClass(ClassLoader.java:219)
> at org.apache.java.lang.AdaptiveClassLoader.loadClass(Compiled Code)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:154)
> at
> org.apache.jserv.JServServletManager.load_init(JServServletManager.java:421)
> at
> org.apache.jserv.JServServletManager.loadServlet(JServServletManager.java:38
> 3)
> at org.apache.jserv.JServConnection.run(JServConnection.java:301)
> at java.lang.Thread.run(Thread.java:466)
>
> I'm using Jserv 1.0b3, Apache 1.3.6 with JDK 1.1.8, JSDK 2.0, under Windows
> NT.
>
> Michael Prescott
>
This is due to the fact that Windows is not case sensitive on filenames, but
Java is. From the Java perspective, "Simpleservlet" and "SimpleServlet" are
not the same, even though Windows isn't smart enough to know that. By the way,
this will affect any reference to a class in any Java program on Windows, not
just servlets under Apache JServ.
Craig McClanahan
|