I am sure the weblogic.jar is in directory D:\Tomcat 4.1\webapps\test\WEB-INF\lib and the jar is loaded.
Here is the snippet of my servlet:

Properties h = new Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
h.put(Context.PROVIDER_URL,"t3://localhost:7001");
Context ctx = new InitialContext(h);//The error line。

BugSysUserSessionHome userHome=(BugSysUserSessionHome)ctx.lookup("BugSysUserSessionBean");

I can't get the Context in tomcat ,the stack trace is below:

java.lang.NoClassDefFoundError: weblogic/rmi/extensions/server/Stub
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:509)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:431)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:169)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:207)
at weblogic.utils.classfile.utils.CodeGenerator.generateClass(CodeGenerator.java:71)
at weblogic.rmi.internal.StubGenerator.getStubClass(StubGenerator.java:672)
at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:712)
at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:699)
at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:76)
at weblogic.jndi.WLInitialContextFactoryDelegate.newRootNamingNodeStub(WLInitialContextFactoryDelegate.java:486)
at weblogic.jndi.WLInitialContextFactoryDelegate.newRemoteContext(WLInitialContextFactoryDelegate.java:449)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:345)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:308)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:234)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:135)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.(InitialContext.java:195)
at com.mellon.test.web.IndexServlet.login(IndexServlet.java:40)
at com.mellon.test.web.IndexServlet.doGet(IndexServlet.java:24)
at com.mellon.test.web.IndexServlet.doPost(IndexServlet.java:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)