Can anyone help further?

I've now skimmed the Java Servlet spec in all the areas I could think to be relevant but without success. Can anyone give me an example of where two different resources of the same type might be referenced for access? Maybe if I could see how two other resources (not McKoi databases like I'm using) are referenced then I could use that to set up my own reference to the McKoi databases?

Thinking laterally is there any mileage in trying to find out how to override the default value for <param-name> ??

Thanks especially to Tejas and Martin for their suggestions,

Iain



Tejas Bavishi wrote:
Hi

Not sure if this is helpful to you. I had found this URL useful. The URL
shows how to setup a JNDI DataSource in Tomcat.
http://tomcat.apache.org/tomcat-4.1-doc/jndi-datasource-examples-howto.html

Also, check the Java Servlet specification for more information.

Regards
Tejas


-----Original Message-----
From: I D B Major [mailto:[EMAIL PROTECTED]
Sent: Monday, June 26, 2006 2:15 PM
To: Tomcat Users List
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;

   <context-param>
       <param-name>javax.servlet.jsp.jstl.sql.dataSource</param-name>
       <param-value>jdbc/mydb</param-value>
   </context-param>
     <resource-ref>
       <description>DB Connection</description>
       <res-ref-name>jdbc/mydb</res-ref-name>
       <res-type>javax.sql.DataSource</res-type>
       <res-auth>Container</res-auth>
   </resource-ref>
     <context-param>
       <param-name>javax.servlet.jsp.jstl.sql.dataSource</param-name>
       <param-value>jdbc/curzon</param-value>
   </context-param>
     <resource-ref>
       <description>DB Connection</description>
       <res-ref-name>jdbc/curzon</res-ref-name>
       <res-type>javax.sql.DataSource</res-type>
       <res-auth>Container</res-auth>
   </resource-ref>

If I change the name of either of the <param-name> then the other will
work and allow database access to that database (ie <Resource> 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 <param-name> 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 <context-param> altogether but none of these work.

Please can someone point me in the right direction for how to find out
what the <param-name> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_____________________________________________________________________

This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete  this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at [EMAIL PROTECTED] and delete this mail. _____________________________________________________________________

------------------------------------------------------------------------

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to