Details:

i'm using netbeans 7 with tomcat server. i created a web appilcation which requires database connection, the best option is mysql( as i'm going to use). i created a new database named "rainbow" with host at '127.0.0.1'( i think it is default) and user as 'root' and password is 'honour', on port 3306 tcp.
even i intergrated mysql into netbeans and it is actively showing the database there.

The Problem:
when i deploy application using netbeans on tomcat 7.0.21, no problem util any request for database access. whenever a access is reqiured server log shows the following error:
WARNING: Unhandled exception
java.lang.RuntimeException: A JNDI error occured: Name rainbow is not bound in this Context
at model.userDAO.retrive(userDAO.java:67)
at controller.memberslogin.execute(memberslogin.java: 52)
at org.apache.struts.chain.commands.servlet.ExecuteAc tion.execute(ExecuteAction.java:58)
at org.apache.struts.chain.commands.AbstractExecuteAc tion.execute(AbstractExecuteAction.java:67)
at org.apache.struts.chain.commands.ActionCommandBase .execute(ActionCommandBase.java:51)
at org.apache.commons.chain.impl.ChainBase.execute(Ch ainBase.java:190)
at org.apache.commons.chain.generic.LookupCommand.exe cute(LookupCommand.java:304)
at org.apache.commons.chain.impl.ChainBase.execute(Ch ainBase.java:190)
at org.apache.struts.chain.ComposableRequestProcessor .process(ComposableRequestProcessor.java:283)
at org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:722)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:185)
at org.apache.catalina.authenticator.AuthenticatorBas e.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:405)
at org.apache.coyote.http11.Http11AprProcessor.proces s(Http11AprProcessor.java:269)
at org.apache.coyote.AbstractProtocol$AbstractConnect ionHandler.process(AbstractProtocol.java:515)
at org.apache.tomcat.util.net.AprEndpoint$SocketProce ssor.run(AprEndpoint.java:1773)
at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

Sep 24, 2011 11:58:22 AM org.apache.struts.chain.commands.ExceptionCatcher postprocess
WARNING: Exception from exceptionCommand 'servlet-exception'
java.lang.RuntimeException: A JNDI error occured: Name rainbow is not bound in this Context
at model.userDAO.retrive(userDAO.java:67)
at controller.memberslogin.execute(memberslogin.java: 52)
at org.apache.struts.chain.commands.servlet.ExecuteAc tion.execute(ExecuteAction.java:58)
at org.apache.struts.chain.commands.AbstractExecuteAc tion.execute(AbstractExecuteAction.java:67)
at org.apache.struts.chain.commands.ActionCommandBase .execute(ActionCommandBase.java:51)
at org.apache.commons.chain.impl.ChainBase.execute(Ch ainBase.java:190)
at org.apache.commons.chain.generic.LookupCommand.exe cute(LookupCommand.java:304)
at org.apache.commons.chain.impl.ChainBase.execute(Ch ainBase.java:190)
at org.apache.struts.chain.ComposableRequestProcessor .process(ComposableRequestProcessor.java:283)
at org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:722)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:185)
at org.apache.catalina.authenticator.AuthenticatorBas e.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:405)
at org.apache.coyote.http11.Http11AprProcessor.proces s(Http11AprProcessor.java:269)
at org.apache.coyote.AbstractProtocol$AbstractConnect ionHandler.process(AbstractProtocol.java:515)
at org.apache.tomcat.util.net.AprEndpoint$SocketProce ssor.run(AprEndpoint.java:1773)
at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
i understand that it is not finding the required JNDI name, and in order to solve this context.xml is modified as:
<Context path="/rainbow" docBase="rainbow"
debug="5" reloadable="true" crossContext="true">

<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_DBTest_log." suffix=".txt"
timestamp="true"/>

<Resource name="jdbc/mindu"
auth="Container"
type="javax.sql.DataSource"/>

<ResourceParams name="jdbc/rainbow">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFact ory</value>
</parameter>

<!-- Maximum number of dB connections in pool. Make sure you
configure your mysqld max_connections large enough to handle
all of your db connections. Set to -1 for no limit.
-->
<parameter>
<name>maxActive</name>
<value>100</value>
</parameter>

<parameter>
<name>removeAbandoned</name>
<value>true</value>
</parameter>


<!-- Maximum number of idle dB connections to retain in pool.
Set to 0 for no limit.
-->
<parameter>
<name>maxIdle</name>
<value>30</value>
</parameter>

<!-- Maximum time to wait for a dB connection to become available
in ms, in this example 10 seconds. An Exception is thrown if
this timeout is exceeded. Set to -1 to wait indefinitely.
-->
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>

<!-- MySQL dB username and password for dB connections -->
<parameter>
<name>username</name>
<value>root</value>
</parameter>
<parameter>
<name>password</name>
<value>honour</value>
</parameter>

<!-- Class name for mm.mysql JDBC driver -->
<parameter>
<name>driverClassName</name>
<value>org.gjt.mm.mysql.Driver</value>
</parameter>

<!-- The JDBC connection url for connecting to your MySQL dB.
-->
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/rainbow</value>
</parameter>
</ResourceParams>
</Context>
still the problems remains intact??
any help is appreciated.
please help.