tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 4706] New: - problem when servlet.jar is accessed by other classes
Date Wed, 07 Nov 2001 19:25:57 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4706>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4706

problem when servlet.jar is accessed by other classes

           Summary: problem when servlet.jar is accessed by other classes
           Product: Tomcat 4
           Version: 4.0.1 Final
          Platform: PC
        OS/Version: Other
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: zack.lemonik@multex.com


On my a JSP page, I invokes a java class that references ServletRequest and 
ServletResponse.  If tomcat\common\lib\servlet.jar is not in the runtime 
classpath, then a ClassDefNotFound exception is thrown.  However if this path 
is put in the classpath then a "Violates Loader Constraints" error is returned 
when the page is compiled.  My understanding is that this is because Tomcat 4 
does not allow any of its the classes in its default sub-directories to be 
loaded.  Furthermore, if I make a copy servlet.jar in a directory outside of 
Tomcat and include that in the classpath, another "Violates Loader Constraints" 
error is returned because the JVM views these copied classes as imposters.

Therefore the only workaround I could find is to remove servlet.jar from 
tomcat\common\lib and place it in a directory outside tomcat, and then to 
include a path to the new location in the runtime classpath.  This isn't a big 
deal, but I seem to remember that in earlier versions of Tomcat, one could 
simply put tomcat\lib\servlet.jar in the classpath and it worked.  Again this 
would only be an issue when one writes classes that reference servlet.jar and 
then tries to invoke those classes in a servlet.

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message