Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 30858 invoked by uid 500); 18 Sep 2001 17:41:36 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: tomcat-user@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 30843 invoked from network); 18 Sep 2001 17:41:36 -0000 Date: Mon, 18 Sep 2000 11:39:35 -0600 (Mountain Daylight Time) From: Huaxin To: Subject: Re: JSP page to Oracle with Tomcat all files In-Reply-To: <3BA6F482.AD64A70E@brocom.de> Message-ID: X-X-Sender: hxzhang@sunkay.cs.ualberta.ca MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Just curious on the URL you've mentioned, how can you append the userid and passwd after the jdbc:oracle:thin:@xxx.x things? i know the format for cloud DB, i am wondering it for oracle only On Tue, 18 Sep 2001, P.Miller wrote: > Hi Peter, > > I put the IP-Adress after the '@' and use the 'thin' driver instead of > the 'oci8'. > Also you have to put the port# on which the Listener waits for calls. > In most cases it's the 1521. > And the name of your Database ORCL or something else > So the string should look like : > jdbc:oracle:thin:@xxx.xxx.xxx.xxx:1521:ORCL > plus userid and password. > > Hth > > Peter > > > > Not sure why all the attachments did not come through but here goes > > again: > > > > Tomcat 4.0 b7 > > Solaris 8 > > Oracle 8.1.7 > > > > I am trying to perform a Oracle DB query from a jsp page. I have included > > the web.xml file the jsp page "fwtst.jsp" and the error message I am > > having returned to me from the query. > > I believe the problem is that I do not know how to make system > > environments known to JSP or Tomcat. This is because of the error I am > > getting which is "javax.servlet.ServletException: ORA-12154: TNS:could > > not resolve service name at so on and so on" > > > > >From my Oracle experience I know this error typically mean you are using > > the wrong DB alias or an environment variable such as ORACLE_HOME or > > TNS_ADMIN is not set or is incorrect. > > > > Before I start Tomcat I have checked and re-checked my ability to run > > sqlplus and connect to the DB but from the JSP page I cannot. > > > > My questions are > > Can I set environmental variables such as ORACLE_HOME in the JSP. If so > > how? please give a short example > > Can I use one of Tomcat's files such as web.xml or server. xml ?? > > Can I use one of the web-appliation files such as web.xml?? > > > > Thanks > > Pete > > > > ------------------------------------------------------------------------ > > Name: files.tar > > files.tar Type: Unix Tape Archive (application/x-tar) > > Encoding: base64 > > Description: filename="files.tar" >