If you're using a client install of oracle instead of the thin drivers (I'm guessing because of your @TOMCATDB syntax) then the url is jdbc:oracle:oci8:user/passwd@TNSname ie
jdbc:oracle:oci8:spifdogg/spifdogg@TOMCATDB or jdbc:oracle:oci8:@TOMCATDB and passs the user and password into the getConnection call. But for any non-trival system, you should be using a connection pool (search the archives for a HowTo) Les > -----Original Message----- > From: Vikramjit Singh [mailto:[EMAIL PROTECTED]] > Sent: 02 July 2002 05:43 > To: 'Tomcat Users List' > Subject: RE: Error with Oracle Jdbc > > > the url which i use is like this > > DriverManager.getConnection("jdbc:oracle:thin:@ServerName:1521:SID, > USERNAME, PASSWORD); > > Regards, > Vikramjit Singh, > Systems Engineer, > GTL Ltd. > Ph. 7612929-1031 > > > -----Original Message----- > From: William Gustave [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 01, 2002 9:37 PM > To: TOMCAT USER > Subject: Error with Oracle Jdbc > Importance: High > > > I am getting the following Error from my app when I hit the > index.jsp page. > Can somebody help me it would be greatly appreciated. > > jdbc java.sql.SQLException: Invalid Oracle URL specified > > I am running the following > Tomcat 4 (It is on the same machine as the Database Server) > Oracle 8.1 > Oracle8i 8.1.7.1JDBC Drivers (Which I have extracted into > \tomcat4\webapps\testoracle\WEB-INF\classes directory) > > Below is the JSP code that is on the page. > > <%@ page import="oracle.jdbc.driver.*" %> > <%@ page import="java.sql.*" %> > > <% > try{ > > Class.forName("oracle.jdbc.driver.OracleDriver"); > Connection conn = > DriverManager.getConnection("jdbc:oracle:localhost:@TOMCATDB", > "spifdogg", > "spifdogg"); > Statement statemnt = conn.createStatement(); > > ResultSet users = statemnt.executeQuery("select * from user"); > > }catch(Exception e){ > out.println(e); > } > %> > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>