accessing a class in servlet that's outside WEB-INF/classes

Discussions

Web tier: servlets, JSP, Web frameworks: accessing a class in servlet that's outside WEB-INF/classes

  1. Iam using weblogic6.1 .In my appication i have a war file
    xxx.war containig the jsp's and i have xxx.jar which contain
    all the classes.
    Now i created one servlet, placed it in WEB-INF/classes created xxx.war from war folder.My problem is that servlet is using some java classes .If i put those classes in WEB-INF/classes the servlet is working fine.If I put the classes in xxx.jar servlet is giving the error java.lang.ClassDefNotFound exception.the war is in weblogic6.1/config/xxx/applications
    and the xxx.jar is in weblogic6.1/config/xxx/lib

    IS it possible for a servlet to access the class that is outside /WEB-INF/classes in weblogic6.1?

    Thanks in advance
  2. The jar file xxx.jar should be present in WEB-INF/lib folder

    WEB-INF/classes folder is meant for .class file while the jar files should be present in WEB-INF/lib folder.

    so put the xxx.jar in WEB-INF/lib folder, recreate the .WAR file, redeploy and see if it works.