tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Veniamin Fichin <>
Subject Re: shared/lib again...
Date Fri, 16 Apr 2004 06:37:49 GMT
Julio C├ęsar Aguilar wrote:

>>    If you use multiple instance Tomcat's feature, this may be the case. 
> In Windows I'm using a single instance of tomcat, there's no 
> CATALINA_BASE so it should be the same as CATALINA_HOME if I understand 
> correctly.

    Then I don't know... My installation is that:

Java is 1.4.1_01
CATALINA_BASE=D:\Projects\CA (or any other)

    %CATALINA_BASE%\shared\lib contains jars needed by most 
applications, and that classes are visible to application. Removing 
CATALINA_BASE variable and placing jars into %CATALINA_HOME%\shared\lib 
still works.
    I just wrote a simple servlet that looks for the class whose name is 
passed as parameter.

package org.unchqua.test.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class IsThereThisClass extends HttpServlet {

     public void doGet (HttpServletRequest req, HttpServletResponse resp)
                 throws ServletException, IOException {
         PrintWriter out=resp.getWriter();
         String cn=req.getParameter("cn");
         ClassLoader cnLoader=null;
         if (cn==null) {
             out.println("No class name given, I want \"cn\" parameter");
         out.print("The class \""+cn+"\" is");
         try {
         catch (ClassNotFoundException cnfe) {
             out.print(" not");
         out.println(" found");
         if (cnLoader!=null) {


    Map it to any working application and call it like 
classfind?cn=com.example.your.package.YourClass to see if it is visible 
to any webapp's classloader.
    What exactly the moment when CNFE is thrown? You said that the 
applications is not even start due to CNFE, so that classes are needed 
during deployment or while normal application functioning?

> In Linux I'm using a single binary of tomcat and have the jar in 
> CATALINA_BASE/shared/lib.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message