Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 5754 invoked from network); 4 Dec 2002 15:47:30 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 4 Dec 2002 15:47:30 -0000 Received: (qmail 24257 invoked by uid 97); 4 Dec 2002 15:48:07 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 24219 invoked by uid 97); 4 Dec 2002 15:48:06 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 24206 invoked by uid 98); 4 Dec 2002 15:48:05 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: JNDI; InitialContext not found? Date: Wed, 4 Dec 2002 10:46:13 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: JNDI; InitialContext not found? Thread-Index: AcKbp0VFEPUjPN9iSbeflP6jw2UHngABNLFQ From: "Shapira, Yoav" To: "Tomcat Users List" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, It's fairly simple, I think: you need to import a few more things. Add = import statements for javax.naming.InitialContext, javax.sql.DataSource, = java.sql.Connection... and see what happens ;) Yoav Shapira Millennium ChemInformatics -----Original Message----- From: Eddie Liang [mailto:eliang@edge.com]=20 Sent: Wednesday, December 04, 2002 10:11 AM To: 'Tomcat Users List' Subject: JNDI; InitialContext not found? Hi, =A0 I use jsp to invoke a Context, but Tomcat give a error message: org.apache.jasper.JasperException: Unable to compile class for JSPNote: = sun.tools.javac.Main has been deprecated. An error occurred between lines: 13 and 25 in the jsp file: = /JSP/com/imedge/admin/testfam.jsp Generated servlet error: C:\Tomcat = 4.0\work\Standalone\localhost\_\JSP\com\imedge\admin\testfam$jsp.java:65:= Class org.apache.jsp.InitialContext not found. =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 Context ctx =3D new InitialContext(); =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ^ An error occurred between lines: 13 and 25 in the jsp file: = /JSP/com/imedge/admin/testfam.jsp Generated servlet error: C:\Tomcat = 4.0\work\Standalone\localhost\_\JSP\com\imedge\admin\testfam$jsp.java:69:= Class org.apache.jsp.DataSource not found. =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 DataSource ds =3D (DataSource) = envCtx.lookup("jdbc/ImedgeDB"); =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 ^ An error occurred between lines: 13 and 25 in the jsp file: = /JSP/com/imedge/admin/testfam.jsp Generated servlet error: C:\Tomcat = 4.0\work\Standalone\localhost\_\JSP\com\imedge\admin\testfam$jsp.java:69:= Class org.apache.jsp.DataSource not found. =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 DataSource ds =3D (DataSource) = envCtx.lookup("jdbc/ImedgeDB"); =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ^ An error occurred between lines: 13 and 25 in the jsp file: = /JSP/com/imedge/admin/testfam.jsp Generated servlet error: C:\Tomcat = 4.0\work\Standalone\localhost\_\JSP\com\imedge\admin\testfam$jsp.java:73:= Class org.apache.jsp.Connection not found. =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Connection conn =3D = ds.getConnection(); =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ^ My jsp file is : <%@ page import =3D "com.imedge.admin.testImedge" %> =A0=A0=A0=A0=A0=A0=A0 =20 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=20 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0

    Family

<%@ page import=3D"javax.naming.Context" %> =A0=A0=A0=A0=A0=A0=A0 <%=20 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Context ctx =3D new InitialContext(); =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (ctx =3D=3Dnull) =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 throw new Exception("Oh my = God - No context"); =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Context envCtx =3D (Context) = ctx.lookup("java:comp/env"); =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 DataSource ds =3D (DataSource) = envCtx.lookup("jdbc/ImedgeDB"); =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 out.print("DataSource " + = ds); =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if( ds !=3D null) =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 { =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = Connection conn =3D ds.getConnection(); =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 } =A0%> =A0 My server.xml and web.xml is in the attachments. Does anyone know what is wrong here?=A0 Or do I miss anything? Thank you very much.=20 <>=20 <>=20 =A0=A0=A0=A0=20 Eddie Liang Database Architect Phone: 630-297-1229 -- To unsubscribe, e-mail: For additional commands, e-mail: