Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 2107 invoked from network); 26 Jun 2006 12:20:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Jun 2006 12:20:40 -0000 Received: (qmail 62784 invoked by uid 500); 26 Jun 2006 12:20:27 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 62496 invoked by uid 500); 26 Jun 2006 12:20:26 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 62485 invoked by uid 99); 26 Jun 2006 12:20:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jun 2006 05:20:26 -0700 X-ASF-Spam-Status: No, hits=0.3 required=10.0 tests=HTML_MESSAGE,MAILTO_TO_SPAM_ADDR X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [137.222.10.102] (HELO dirg.bris.ac.uk) (137.222.10.102) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jun 2006 05:20:25 -0700 Received: from isis.bris.ac.uk ([137.222.10.63]) by dirg.bris.ac.uk with esmtp (Exim 4.60) (envelope-from ) id 1Fuq4P-0002kU-Jc for users@tomcat.apache.org; Mon, 26 Jun 2006 13:20:04 +0100 Received: from kalimalua.cs.bris.ac.uk ([137.222.107.193]) by isis.bris.ac.uk with esmtp (Exim 4.60) (envelope-from ) id 1Fuq3P-0006Sl-P9 for users@tomcat.apache.org; Mon, 26 Jun 2006 13:19:03 +0100 Message-ID: <449FD0B3.5030706@cs.bris.ac.uk> Date: Mon, 26 Jun 2006 13:18:59 +0100 From: I D B Major User-Agent: Thunderbird 1.5.0.4 (X11/20060516) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Problem accessing two McKoi databases from Tomcat References: <449BADB7.7040703@cs.bris.ac.uk> <449F9E75.1010600@cs.bris.ac.uk> In-Reply-To: Content-Type: multipart/alternative; boundary="------------060203030002050600030408" X-Spam-Score: -1.2 X-Spam-Level: - X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --------------060203030002050600030408 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Martin, /"So if I understand ..Your 2 separate jdbc connections are acquiring Data .. " / That's what I'm aiming at. The idea (just to begin with) is to print out the contents of two very small test tables from different databases. I'm able to use each separately but once I try to use both I get nothing from either. Seemingly the only name I can use for param-name is javax.servlet.jsp.jstl.sql.dataSource which I have read somewhere is a default but you can't duplicate it. Therefore I can't access two at once. Maybe I need to put the references to the two databases elsewhere than in WEB-INF/web.xml but I can't see where. As for merging data etc I'm using my own JSTL tag files in a JSP page to print out on the page - see edited details below; <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="a" tagdir="/WEB-INF/tags" %> Film Database

Film Database - Update page

... ... Where ShowFilms.tag is <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %> select * from Film ... ...
FilmID Title
${a.filmID} ${a.title}
As I said above each tag works in isolation if I alter the name of the relevant thus my tag files are all correct. Many thanks for your help, Iain Martin Gainty wrote: > So if I understand ..Your 2 separate jdbc connections are acquiring > Data .. > but then once both resultsets are acquired I would suggest you must > programatically merging the contents > before sending the (presumably HTML) formatted info back via the > Response stream > > Do you have any requirements on how this data should be formatted? > e.g. > Resultset from DB1 followed by Resultset from DB2 > -OR- > one line of Data from DB1 interleaved by 1 line from DB2 > Anyone else ??? > Martin-- > This email message and any files transmitted with it contain confidential > information intended only for the person(s) to whom this email message is > addressed. If you have received this email message in error, please > notify > the sender immediately by telephone or email and destroy the original > message without making a copy. Thank you. > > ----- Original Message ----- From: "I D B Major" > > To: "Tomcat Users List" > Sent: Monday, June 26, 2006 4:44 AM > Subject: Re: Problem accessing two McKoi databases from Tomcat > > >> Hi all, >> >> please can someone confirm whether I need to clarify anything in my >> question or take a different approach since I have had no replies and >> am anxious to make sure I am doing all I can to seek help in the >> correct way. Please correct me if my approach is wrong! >> >> many thanks >> >> >> Iain >> >> >> I D B Major wrote: >>> Hi >>> >>> I am a student trying to set up a project using JSP with JSTL custom >>> tags to provide dynamic pages to allow a web-based ticketing system >>> for independent cinemas. I am at the early stages of testing that I >>> can use the technologies. I have installed and configured Tomcat to >>> allow password protection to the site and I have embedded a McKoi >>> database which I can access and use to do insert, update and delete >>> queries using a test JSP page which has customised JSTL tags that >>> are used to run the SQL query on the database. >>> >>> I am now trying to display data from two separate databases. I can >>> get each to display separately but not both at once. My issues seem >>> to be around the details held in web.xml which are as follows; >>> >>> >>> javax.servlet.jsp.jstl.sql.dataSource >>> jdbc/mydb >>> >>> >>> DB Connection >>> jdbc/mydb >>> javax.sql.DataSource >>> Container >>> >>> >>> javax.servlet.jsp.jstl.sql.dataSource >>> jdbc/curzon >>> >>> >>> DB Connection >>> jdbc/curzon >>> javax.sql.DataSource >>> Container >>> >>> >>> If I change the name of either of the then the other >>> will work and allow database access to that database (ie >>> details in server.xml are correctly recorded) but the one which is >>> altered is not available so that Tomcat displays an error message to >>> say the table requested is not found; >>> >>> org.apache.jasper.JasperException: javax.servlet.jsp.JspException: >>> select * from Film >>> >>> : Table 'APP.Film' was not found. >>> >>> I have googled and googled, read the apache website in all areas I >>> can think of to look up and have asked my tutor for help. All >>> without success. I have discovered that the given above >>> is a default so I tried adjusting the names (setting first one and >>> then the other to javax.servlet.jsp.jstl.dataSource.other or >>> javax.servlet.jsp.jstl..otherdataSource or other.dataSource) and >>> even removing the altogether but none of these work. >>> >>> Please can someone point me in the right direction for how to find >>> out what the needs to be set to in order to allow two >>> databases to be accessed at once? >>> >>> many thanks, >>> >>> Iain M >>> >>> >>> --------------------------------------------------------------------- >>> To start a new topic, e-mail: users@tomcat.apache.org >>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>> For additional commands, e-mail: users-help@tomcat.apache.org >>> >> >> >> --------------------------------------------------------------------- >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: users-help@tomcat.apache.org >> >> > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > --------------060203030002050600030408--